mirror of
https://github.com/apple/foundationdb.git
synced 2025-05-15 02:18:39 +08:00
Add skeleton for sharded rocksdb KVS. (#7181)
This commit is contained in:
parent
0be1369d39
commit
6bf1e3921f
@ -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
|
||||
|
@ -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
|
||||
|
1840
fdbserver/KeyValueStoreShardedRocksDB.actor.cpp
Normal file
1840
fdbserver/KeyValueStoreShardedRocksDB.actor.cpp
Normal file
File diff suppressed because it is too large
Load Diff
@ -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)
|
||||
|
9
tests/noSim/ShardedRocksDBTest.toml
Normal file
9
tests/noSim/ShardedRocksDBTest.toml
Normal file
@ -0,0 +1,9 @@
|
||||
[[test]]
|
||||
testTitle = 'UnitTests'
|
||||
useDB = false
|
||||
startDelay = 0
|
||||
|
||||
[[test.workload]]
|
||||
testName = 'UnitTests'
|
||||
maxTestCases = 10
|
||||
testsMatching = 'noSim/ShardedRocksDB/'
|
Loading…
x
Reference in New Issue
Block a user