2f93a3b809
Summary: In final polishing of https://github.com/facebook/rocksdb/issues/8297 (after most manual testing), I broke my own caching layer by sanitizing an input parameter with std::min(0, x) instead of std::max(0, x). I resisted unit testing the timing part of the result caching because historically, these test are either flaky or difficult to write, and this was not a correctness issue. This bug is essentially unnoticeable with a small number of column families but can explode background work with a large number of column families. This change fixes the logical error, removes some unnecessary related optimization, and adds mock time/sleeps to the unit test to ensure we can cache hit within the age limit. Pull Request resolved: https://github.com/facebook/rocksdb/pull/8369 Test Plan: added time testing logic to existing unit test Reviewed By: ajkr Differential Revision: D28950892 Pulled By: pdillinger fbshipit-source-id: e79cd4ff3eec68fd0119d994f1ed468c38026c3b |
||
---|---|---|
.. | ||
cache_bench_tool.cc | ||
cache_bench.cc | ||
cache_entry_roles.cc | ||
cache_entry_roles.h | ||
cache_entry_stats.h | ||
cache_helpers.h | ||
cache_test.cc | ||
cache.cc | ||
clock_cache.cc | ||
clock_cache.h | ||
lru_cache_test.cc | ||
lru_cache.cc | ||
lru_cache.h | ||
sharded_cache.cc | ||
sharded_cache.h |