rocksdb/test_util
Peter Dillinger ccaa3225b0 Simplify tracking entries already in SecondaryCache (#11299)
Summary:
In preparation for factoring secondary cache support out of individual Cache implementations, we can get rid of the "in secondary cache" flag on entries through a workable hack: when an entry is promoted from secondary, it is inserted in primary using a helper that lacks secondary cache support, thus preventing re-insertion into secondary cache through existing logic.

This adds to the complexity of building CacheItemHelpers, because you always have to be able to get to an equivalent helper without secondary cache support, but that complexity is reasonably isolated within RocksDB typed_cache.h and test code.

gcc-7 seems to have problems with constexpr constructor referencing `this` so removed constexpr support on CacheItemHelper.

Also refactored some related test code to share common code / functionality.

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

Test Plan: existing tests

Reviewed By: anand1976

Differential Revision: D44101453

Pulled By: pdillinger

fbshipit-source-id: 7a59d0a3938ee40159c90c3e65d7004f6a272345
2023-03-15 17:51:44 -07:00
..
mock_time_env.cc
mock_time_env.h
secondary_cache_test_util.cc Simplify tracking entries already in SecondaryCache (#11299) 2023-03-15 17:51:44 -07:00
secondary_cache_test_util.h Simplify tracking entries already in SecondaryCache (#11299) 2023-03-15 17:51:44 -07:00
sync_point.cc clang format files under test_util/ (#10855) 2022-10-24 20:32:25 -07:00
sync_point.h clang format files under test_util/ (#10855) 2022-10-24 20:32:25 -07:00
sync_point_impl.cc clang format files under test_util/ (#10855) 2022-10-24 20:32:25 -07:00
sync_point_impl.h clang format files under test_util/ (#10855) 2022-10-24 20:32:25 -07:00
testharness.cc clang format files under test_util/ (#10855) 2022-10-24 20:32:25 -07:00
testharness.h
testutil.cc Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
testutil.h Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
testutil_test.cc
transaction_test_util.cc Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
transaction_test_util.h Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00