rocksdb/cache
Zhichao Cao 6d93b87588 Add lowest_used_cache_tier to ImmutableDBOptions to enable or disable Secondary Cache (#9050)
Summary:
Currently, if Secondary Cache is provided to the lru cache, it is used by default. We add CacheTier to advanced_options.h to describe the cache tier we used. Add a `lowest_used_cache_tier` option to `DBOptions` (immutable) and pass it to BlockBasedTableReader to decide if secondary cache will be used or not. By default it is `CacheTier::kNonVolatileTier`, which means, we always use both block cache (kVolatileTier) and secondary cache (kNonVolatileTier). By set it to `CacheTier::kVolatileTier`, the DB will not use the secondary cache.

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

Test Plan: added new tests

Reviewed By: anand1976

Differential Revision: D31744769

Pulled By: zhichao-cao

fbshipit-source-id: a0575ebd23e1c6dfcfc2b4c8578764e73b15bce6
2021-10-19 15:54:23 -07:00
..
cache_bench_tool.cc Make SecondaryCache Customizable (#8480) 2021-07-06 09:18:08 -07:00
cache_bench.cc Add (& fix) some simple source code checks (#8821) 2021-09-07 21:19:27 -07:00
cache_entry_roles.cc Account for dictionary-building buffer in global memory limit (#8428) 2021-09-08 12:35:46 -07:00
cache_entry_roles.h Account for dictionary-building buffer in global memory limit (#8428) 2021-09-08 12:35:46 -07:00
cache_entry_stats.h Fix and detect headers with missing dependencies (#8893) 2021-09-10 10:00:26 -07:00
cache_helpers.h Use deleters to label cache entries and collect stats (#8297) 2021-05-19 16:51:13 -07:00
cache_reservation_manager_test.cc Refactor WriteBufferManager::CacheRep into CacheReservationManager (#8506) 2021-08-24 12:43:31 -07:00
cache_reservation_manager.cc Account for dictionary-building buffer in global memory limit (#8428) 2021-09-08 12:35:46 -07:00
cache_reservation_manager.h Add comment for new_memory_used parameter in CacheReservationManager::UpdateCacheReservation (#8895) 2021-09-09 15:25:24 -07:00
cache_test.cc Use deleters to label cache entries and collect stats (#8297) 2021-05-19 16:51:13 -07:00
cache.cc Make SecondaryCache Customizable (#8480) 2021-07-06 09:18:08 -07:00
clock_cache.cc Replace most typedef with using= (#8751) 2021-09-07 11:31:59 -07:00
clock_cache.h Change RocksDB License 2017-07-15 16:11:23 -07:00
lru_cache_test.cc Add lowest_used_cache_tier to ImmutableDBOptions to enable or disable Secondary Cache (#9050) 2021-10-19 15:54:23 -07:00
lru_cache.cc Fix a race in LRUCacheShard::Promote (#8717) 2021-08-30 19:10:55 -07:00
lru_cache.h Add a stat to count secondary cache hits (#8666) 2021-08-16 21:01:14 -07:00
sharded_cache.cc Add a stat to count secondary cache hits (#8666) 2021-08-16 21:01:14 -07:00
sharded_cache.h Add a stat to count secondary cache hits (#8666) 2021-08-16 21:01:14 -07:00