rocksdb/cache
Peter Dillinger 5ad3227650 Work around falsely reported data race on LRUHandle::flags (#8539)
Summary:
Some bits are mutated and read while holding a lock, other
immutable bits (esp. secondary cache compatibility) can be read by
arbitrary threads without holding a lock. AFAIK, this doesn't cause an
issue on any architecture we care about, because you will get some
legitimate version of the value that includes the initialization, as
long as synchronization guarantees the initialization happens before the
read.

I've only seen this in https://github.com/facebook/rocksdb/issues/8538 so far, but it should be fixed regardless.
Otherwise, we'll surely get these false reports again some time.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/8539

Test Plan: some local TSAN test runs and in CircleCI

Reviewed By: zhichao-cao

Differential Revision: D29720262

Pulled By: pdillinger

fbshipit-source-id: 365fd7e565577c648815161f71b339bcb5ce12d5
2021-07-15 16:09:18 -07:00
..
cache.cc Make SecondaryCache Customizable (#8480) 2021-07-06 09:18:08 -07:00
cache_bench.cc Allow cache_bench/db_bench to use a custom secondary cache (#8312) 2021-05-19 15:26:18 -07:00
cache_bench_tool.cc Make SecondaryCache Customizable (#8480) 2021-07-06 09:18:08 -07:00
cache_entry_roles.cc Use deleters to label cache entries and collect stats (#8297) 2021-05-19 16:51:13 -07:00
cache_entry_roles.h Clarify some DB::Open,OpenForReadOnly semantics (#8379) 2021-06-14 16:09:21 -07:00
cache_entry_stats.h Pin CacheEntryStatsCollector to fix performance bug (#8385) 2021-06-14 08:15:11 -07:00
cache_helpers.h Use deleters to label cache entries and collect stats (#8297) 2021-05-19 16:51:13 -07:00
cache_test.cc Use deleters to label cache entries and collect stats (#8297) 2021-05-19 16:51:13 -07:00
clock_cache.cc Use deleters to label cache entries and collect stats (#8297) 2021-05-19 16:51:13 -07:00
clock_cache.h Change RocksDB License 2017-07-15 16:11:23 -07:00
lru_cache.cc Work around falsely reported data race on LRUHandle::flags (#8539) 2021-07-15 16:09:18 -07:00
lru_cache.h Work around falsely reported data race on LRUHandle::flags (#8539) 2021-07-15 16:09:18 -07:00
lru_cache_test.cc Make SecondaryCache Customizable (#8480) 2021-07-06 09:18:08 -07:00
sharded_cache.cc Use deleters to label cache entries and collect stats (#8297) 2021-05-19 16:51:13 -07:00
sharded_cache.h Parallelize secondary cache lookup in MultiGet (#8405) 2021-06-18 09:35:59 -07:00