mirror of
https://github.com/facebook/rocksdb.git
synced 2024-12-04 20:02:50 +00:00
a50da404be
Summary: Tsan complains due to a perceived race condition in accessing LRUHandle flags. One thread calls ```LRUHandle::SetHit()``` from ```LRUCacheShard::Lookup()```, while another thread calls ```LRUHandle::IsPending()``` from ```LRUCacheShard::IsReady()```. The latter call is from ```MultiGet```. It doesn't actually have to call ```IsReady``` since a null value indicates the cache handle is not ready, so its sufficient to check for a null value. Also modify ```IsReady``` to acquire the LRU shard mutex. Tests: 1. make check 2. Run tsan_crash Pull Request resolved: https://github.com/facebook/rocksdb/pull/8433 Reviewed By: zhichao-cao Differential Revision: D29278030 Pulled By: anand1976 fbshipit-source-id: 0c9fed56d12eda853e72dadebe75038361bd257f |
||
---|---|---|
.. | ||
cache.cc | ||
cache_bench.cc | ||
cache_bench_tool.cc | ||
cache_entry_roles.cc | ||
cache_entry_roles.h | ||
cache_entry_stats.h | ||
cache_helpers.h | ||
cache_test.cc | ||
clock_cache.cc | ||
clock_cache.h | ||
lru_cache.cc | ||
lru_cache.h | ||
lru_cache_test.cc | ||
sharded_cache.cc | ||
sharded_cache.h |