mirror of https://github.com/facebook/rocksdb.git
ef0c3f08fa
Summary: and some other small enhancements/fixes: * The main bug fixed is that in some rare cases, the "published" table size might be smaller than the actual table size. This is a transient state that can happen with concurrent growth that is normally fixed after enough insertions, but if the cache is destroyed soon enough after growth, it could fail to fully destroy some entries and cause assertion failures. We can fix this by detecting the true table size in the destructor. * Change the "too many iterations" debug threshold from 512 to 768. We might have hit at least one false positive failure. (Failed despite legitimate operation.) * Added some stronger assertions in some places to aid in debugging. * Use COERCE_CONTEXT_SWITCH to make behavior of Grow less predictable in terms of thread interleaving. (Might add in more places.) This was useful in reproducing the destructor bug. * Fix some comments with typos or that were based on earlier revisions of the code. Pull Request resolved: https://github.com/facebook/rocksdb/pull/11988 Test Plan: Variants of this bug-finding command: ``` USE_CLANG=1 COMPILE_WITH_ASAN=1 COMPILE_WITH_UBSAN=1 COERCE_CONTEXT_SWITCH=1 DEBUG_LEVEL=2 make -j32 cache_bench && while ROCKSDB_DEBUG=1 ./cache_bench -cache_type=auto_hyper_clock_cache -histograms=0 -cache_size=80000000 -threads=32 -populate_cache=0 -ops_per_thread=1000 -num_shard_bits=0; do :; done ``` Reviewed By: jowlyzhang Differential Revision: D50470318 Pulled By: pdillinger fbshipit-source-id: d407a8bb0b6d2ddc598a954c319a1640136f12f2 |
||
---|---|---|
.. | ||
cache.cc | ||
cache_bench.cc | ||
cache_bench_tool.cc | ||
cache_entry_roles.cc | ||
cache_entry_roles.h | ||
cache_entry_stats.h | ||
cache_helpers.cc | ||
cache_helpers.h | ||
cache_key.cc | ||
cache_key.h | ||
cache_reservation_manager.cc | ||
cache_reservation_manager.h | ||
cache_reservation_manager_test.cc | ||
cache_test.cc | ||
charged_cache.cc | ||
charged_cache.h | ||
clock_cache.cc | ||
clock_cache.h | ||
compressed_secondary_cache.cc | ||
compressed_secondary_cache.h | ||
compressed_secondary_cache_test.cc | ||
lru_cache.cc | ||
lru_cache.h | ||
lru_cache_test.cc | ||
secondary_cache.cc | ||
secondary_cache_adapter.cc | ||
secondary_cache_adapter.h | ||
sharded_cache.cc | ||
sharded_cache.h | ||
tiered_secondary_cache.cc | ||
tiered_secondary_cache.h | ||
tiered_secondary_cache_test.cc | ||
typed_cache.h |