rocksdb/cache
Peter Dillinger b205c6d029 Fix bug in HyperClockCache ApplyToEntries; cleanup (#10768)
Summary:
We have seen some rare crash test failures in HyperClockCache, and the source could certainly be a bug fixed in this change, in ClockHandleTable::ConstApplyToEntriesRange. It wasn't properly accounting for the fact that incrementing the acquire counter could be ineffective, due to parallel updates. (When incrementing the acquire counter is ineffective, it is incorrect to then decrement it.)

This change includes some other minor clean-up in HyperClockCache, and adds stats_dump_period_sec with a much lower period to the crash test. This should be the primary caller of ApplyToEntries, in collecting cache entry stats.

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

Test Plan: haven't been able to reproduce the failure, but should be in a better state (bug fix and improved crash test)

Reviewed By: anand1976

Differential Revision: D40034747

Pulled By: anand1976

fbshipit-source-id: a06fcefe146e17ee35001984445cedcf3b63eb68
2022-10-06 14:54:21 -07:00
..
cache.cc Add enable_split_merge option for CompressedSecondaryCache (#10690) 2022-09-16 15:41:49 -07:00
cache_bench.cc
cache_bench_tool.cc Call experimental new clock cache HyperClockCache (#10684) 2022-09-16 12:47:29 -07:00
cache_entry_roles.cc
cache_entry_roles.h
cache_entry_stats.h
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 Call experimental new clock cache HyperClockCache (#10684) 2022-09-16 12:47:29 -07:00
charged_cache.cc
charged_cache.h
clock_cache.cc Fix bug in HyperClockCache ApplyToEntries; cleanup (#10768) 2022-10-06 14:54:21 -07:00
clock_cache.h Call experimental new clock cache HyperClockCache (#10684) 2022-09-16 12:47:29 -07:00
compressed_secondary_cache.cc add SetCapacity and GetCapacity for secondary cache (#10712) 2022-09-29 19:15:04 -07:00
compressed_secondary_cache.h add SetCapacity and GetCapacity for secondary cache (#10712) 2022-09-29 19:15:04 -07:00
compressed_secondary_cache_test.cc add SetCapacity and GetCapacity for secondary cache (#10712) 2022-09-29 19:15:04 -07:00
fast_lru_cache.cc Revamp, optimize new experimental clock cache (#10626) 2022-09-16 00:24:11 -07:00
fast_lru_cache.h Revamp, optimize new experimental clock cache (#10626) 2022-09-16 00:24:11 -07:00
lru_cache.cc Some clean-up of secondary cache (#10730) 2022-10-03 22:23:38 -07:00
lru_cache.h Some clean-up of secondary cache (#10730) 2022-10-03 22:23:38 -07:00
lru_cache_test.cc Call experimental new clock cache HyperClockCache (#10684) 2022-09-16 12:47:29 -07:00
sharded_cache.cc Revamp, optimize new experimental clock cache (#10626) 2022-09-16 00:24:11 -07:00
sharded_cache.h Revamp, optimize new experimental clock cache (#10626) 2022-09-16 00:24:11 -07:00