rocksdb/unreleased_history/public_api_changes
anand76 48589b961f Fix updating the capacity of a tiered cache (#11873)
Summary:
Updating the tiered cache (cache allocated using ```NewTieredCache()```) by calling ```SetCapacity()``` on it was not working properly. The initial creation would set the primary cache capacity to the combined primary and compressed secondary cache capacity. But ```SetCapacity()``` would just set the primary cache capacity, with no way to change the secondary cache capacity. Additionally, the API was confusing, since the primary and compressed secondary capacities would be specified separately during creation, but ```SetCapacity``` took the combined capacity.

With this fix, the user always specifies the total budget and compressed secondary cache ratio on creation. Subsequently, `SetCapacity` will distribute the new capacity across the two caches by the same ratio. The `NewTieredCache` API has been changed to take the total cache capacity (inclusive of both the primary and the compressed secondary cache) and the ratio of total capacity to allocate to the compressed cache. These are specified in `TieredCacheOptions`. Any capacity specified in `LRUCacheOptions`, `HyperClockCacheOptions` and `CompressedSecondaryCacheOptions` is ignored. A new API, `UpdateTieredCache` is provided to dynamically update the total capacity, ratio of compressed cache, and admission policy.

Tests:
New unit tests

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

Reviewed By: akankshamahajan15

Differential Revision: D49562250

Pulled By: anand1976

fbshipit-source-id: 57033bc713b68d5da6292207765a6b3dbe539ddf
2023-09-22 18:07:46 -07:00
..
.gitkeep Better management of unreleased HISTORY (#11481) 2023-05-30 16:42:49 -07:00
compact_filter_context_more_info.md Expose more info about input files in CompactionFilter::Context (#11857) 2023-09-20 13:34:39 -07:00
compaction_readahead_size_option_change.md Change compaction_readahead_size default value to 2MB (#11762) 2023-08-30 14:57:08 -07:00
compression_options_level_lz4.md LZ4 set acceleration parameter (#11844) 2023-09-18 09:26:29 -07:00
dyn_tiered_cache_update.md Fix updating the capacity of a tiered cache (#11873) 2023-09-22 18:07:46 -07:00
new_tiered_cache.md Support compressed and local flash secondary cache stacking (#11812) 2023-09-21 20:30:53 -07:00