https://github.com/facebook/rocksdb
Revision ccaa3225b0211d8ab6c48cda9e37f0e0f876f6ff authored by Peter Dillinger on 16 March 2023, 00:51:44 UTC, committed by Facebook GitHub Bot on 16 March 2023, 00:51:44 UTC
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
1 parent 664dabd
History
Tip revision: ccaa3225b0211d8ab6c48cda9e37f0e0f876f6ff authored by Peter Dillinger on 16 March 2023, 00:51:44 UTC
Simplify tracking entries already in SecondaryCache (#11299)
Tip revision: ccaa322
File Mode Size
.circleci
.github
buckifier
build_tools
cache
cmake
coverage
db
db_stress_tool
docs
env
examples
file
fuzz
include
java
logging
memory
memtable
microbench
monitoring
options
plugin
port
table
test_util
third-party
tools
trace_replay
util
utilities
.clang-format -rw-r--r-- 138 bytes
.gitignore -rw-r--r-- 1.0 KB
.lgtm.yml -rw-r--r-- 67 bytes
.watchmanconfig -rw-r--r-- 130 bytes
AUTHORS -rw-r--r-- 322 bytes
CMakeLists.txt -rw-r--r-- 56.9 KB
CODE_OF_CONDUCT.md -rw-r--r-- 3.3 KB
CONTRIBUTING.md -rw-r--r-- 706 bytes
COPYING -rw-r--r-- 17.7 KB
DEFAULT_OPTIONS_HISTORY.md -rw-r--r-- 1.5 KB
DUMP_FORMAT.md -rw-r--r-- 763 bytes
HISTORY.md -rw-r--r-- 274.6 KB
INSTALL.md -rw-r--r-- 8.3 KB
LANGUAGE-BINDINGS.md -rw-r--r-- 1.3 KB
LICENSE.Apache -rw-r--r-- 11.1 KB
LICENSE.leveldb -rw-r--r-- 1.5 KB
Makefile -rw-r--r-- 99.3 KB
PLUGINS.md -rw-r--r-- 705 bytes
README.md -rw-r--r-- 2.0 KB
TARGETS -rw-r--r-- 658.4 KB
USERS.md -rw-r--r-- 8.6 KB
Vagrantfile -rw-r--r-- 1017 bytes
WINDOWS_PORT.md -rw-r--r-- 12.5 KB
common.mk -rw-r--r-- 963 bytes
crash_test.mk -rw-r--r-- 4.2 KB
issue_template.md -rw-r--r-- 294 bytes
rocksdb.pc.in -rw-r--r-- 292 bytes
src.mk -rw-r--r-- 45.9 KB
thirdparty.inc -rw-r--r-- 7.8 KB

README.md

back to top