f8c685c4fc
Summary: We have three layers of block cache that often use the same key but map to different physical data: * BlockBasedTableOptions::block_cache * BlockBasedTableOptions::block_cache_compressed * BlockBasedTableOptions::persistent_cache If any two of these happen to share an underlying implementation and key space (insertion into one shows up in another), then memory safety is broken. The simplest case is block_cache == block_cache_compressed. (Credit mrambacher for asking about this case in a review.) With this change, we explicitly check for overlap and preemptively and safely fail with a Status code. Pull Request resolved: https://github.com/facebook/rocksdb/pull/9172 Test Plan: test added. Crashes without new check Reviewed By: anand1976 Differential Revision: D32465659 Pulled By: pdillinger fbshipit-source-id: 3876b45b6dce6167e5a7a642725ddc86b96f8e40 |
||
---|---|---|
.. | ||
cache_bench_tool.cc | ||
cache_bench.cc | ||
cache_entry_roles.cc | ||
cache_entry_roles.h | ||
cache_entry_stats.h | ||
cache_helpers.h | ||
cache_reservation_manager_test.cc | ||
cache_reservation_manager.cc | ||
cache_reservation_manager.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 |