Add skeleton for sharded rocksdb KVS. (#7181)

This commit is contained in:
Yao Xiao 2022-05-23 15:29:23 -07:00 committed by GitHub
parent 0be1369d39
commit 6bf1e3921f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 1861 additions and 0 deletions

View File

@ -54,6 +54,7 @@ set(FDBSERVER_SRCS
KeyValueStoreCompressTestData.actor.cpp
KeyValueStoreMemory.actor.cpp
KeyValueStoreRocksDB.actor.cpp
KeyValueStoreShardedRocksDB.actor.cpp
KeyValueStoreSQLite.actor.cpp
KmsConnector.h
KmsConnectorInterface.h

View File

@ -91,6 +91,15 @@ public:
int byteLimit = 1 << 30,
ReadType type = ReadType::NORMAL) = 0;
// Shard management APIs.
virtual Future<Void> addRange(KeyRangeRef range, std::string id) { return Void(); }
virtual std::vector<std::string> removeRange(KeyRangeRef range) { return std::vector<std::string>(); }
virtual void persistRangeMapping(KeyRangeRef range, bool isAdd) {}
virtual Future<Void> cleanUpShardsIfNeeded(const std::vector<std::string>& shardIds) { return Void(); };
// To debug MEMORY_RADIXTREE type ONLY
// Returns (1) how many key & value pairs have been inserted (2) how many nodes have been created (3) how many
// key size is less than 12 bytes

File diff suppressed because it is too large Load Diff

View File

@ -190,9 +190,11 @@ if(WITH_PYTHON)
add_fdb_test(TEST_FILES noSim/RandomUnitTests.toml UNIT)
if (WITH_ROCKSDB_EXPERIMENTAL)
add_fdb_test(TEST_FILES noSim/KeyValueStoreRocksDBTest.toml)
add_fdb_test(TEST_FILES noSim/ShardedRocksDBTest.toml)
add_fdb_test(TEST_FILES fast/PhysicalShardMove.toml)
else()
add_fdb_test(TEST_FILES noSim/KeyValueStoreRocksDBTest.toml IGNORE)
add_fdb_test(TEST_FILES noSim/ShardedRocksDBTest.toml IGNORE)
add_fdb_test(TEST_FILES fast/PhysicalShardMove.toml IGNORE)
endif()
add_fdb_test(TEST_FILES rare/CheckRelocation.toml)

View File

@ -0,0 +1,9 @@
[[test]]
testTitle = 'UnitTests'
useDB = false
startDelay = 0
[[test.workload]]
testName = 'UnitTests'
maxTestCases = 10
testsMatching = 'noSim/ShardedRocksDB/'