rocksdb/utilities
Peter Dillinger 3cacd4b4ec Put Cache and CacheWrapper in new public header (#11192)
Summary:
The definition of the Cache class should not be needed by the vast majority of RocksDB users, so I think it is just distracting to include it in cache.h, which is primarily needed for configuring and creating caches. This change moves the class to a new header advanced_cache.h. It is just cut-and-paste except for modifying the class API comment.

In general, operations on shared_ptr<Cache> should continue to work when only a forward declaration of Cache is available, as long as all the Cache instances provided are already shared_ptr. See https://stackoverflow.com/a/17650101/454544

Also, the most common way to customize a Cache is by wrapping an existing implementation, so it makes sense to provide CacheWrapper in the public API. This was a cut-and-paste job except removing the implementation of Name() so that derived classes must provide it.

Intended follow-up: consolidate Release() into one function to reduce customization bugs / confusion

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

Test Plan: `make check`

Reviewed By: anand1976

Differential Revision: D43055487

Pulled By: pdillinger

fbshipit-source-id: 7b05492df35e0f30b581b4c24c579bc275b6d110
2023-02-09 12:12:02 -08:00
..
agg_merge Print stack traces on frozen tests in CI (#10828) 2022-10-18 00:35:35 -07:00
backup Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
blob_db Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
cassandra Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
checkpoint Cleanup, improve, stress test LockWAL() (#11143) 2023-01-30 22:52:30 -08:00
compaction_filters Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
convenience Run clang-format on utilities/ (except utilities/transactions/) (#10853) 2022-10-24 16:38:09 -07:00
leveldb_options Put Cache and CacheWrapper in new public header (#11192) 2023-02-09 12:12:02 -08:00
memory Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
merge_operators Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
option_change_migration Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
options Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
persistent_cache Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
simulator_cache Put Cache and CacheWrapper in new public header (#11192) 2023-02-09 12:12:02 -08:00
table_properties_collectors Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
trace Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
transactions Ensure LockWAL() stall cleared for UnlockWAL() return (#11172) 2023-02-03 12:08:37 -08:00
ttl Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
write_batch_with_index Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
cache_dump_load.cc Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
cache_dump_load_impl.cc Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
cache_dump_load_impl.h Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
compaction_filters.cc Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
counted_fs.cc Fix serious FSDirectory use-after-Close bug (missing fsync) (#10460) 2022-08-02 10:54:32 -07:00
counted_fs.h Explicitly closing all directory file descriptors (#10049) 2022-06-01 18:03:34 -07:00
debug.cc Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
env_mirror.cc Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
env_mirror_test.cc Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
env_timed.cc Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
env_timed.h Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
env_timed_test.cc Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
fault_injection_env.cc Explicitly closing all directory file descriptors (#10049) 2022-06-01 18:03:34 -07:00
fault_injection_env.h Run clang-format on utilities/ (except utilities/transactions/) (#10853) 2022-10-24 16:38:09 -07:00
fault_injection_fs.cc Enable ReadAsync testing and fault injection in db_stress (#11037) 2022-12-15 15:48:50 -08:00
fault_injection_fs.h Enable ReadAsync testing and fault injection in db_stress (#11037) 2022-12-15 15:48:50 -08:00
fault_injection_secondary_cache.cc Major Cache refactoring, CPU efficiency improvement (#10975) 2023-01-11 14:20:40 -08:00
fault_injection_secondary_cache.h Major Cache refactoring, CPU efficiency improvement (#10975) 2023-01-11 14:20:40 -08:00
memory_allocators.h Major Cache refactoring, CPU efficiency improvement (#10975) 2023-01-11 14:20:40 -08:00
merge_operators.cc Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
merge_operators.h Run clang-format on utilities/ (except utilities/transactions/) (#10853) 2022-10-24 16:38:09 -07:00
object_registry.cc Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
object_registry_test.cc Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
util_merge_operators_test.cc Print stack traces on frozen tests in CI (#10828) 2022-10-18 00:35:35 -07:00
wal_filter.cc Make WalFilter, SstPartitionerFactory, FileChecksumGenFactory, and TableProperties Customizable (#8638) 2021-09-28 05:32:02 -07:00