Skip to content

Commit

Permalink
move to low priority thread
Browse files Browse the repository at this point in the history
  • Loading branch information
yao-xiao-github committed May 22, 2024
1 parent 4bda00a commit cc0f429
Show file tree
Hide file tree
Showing 5 changed files with 190 additions and 84 deletions.
2 changes: 1 addition & 1 deletion fdbclient/ServerKnobs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ void ServerKnobs::initialize(Randomize randomize, ClientKnobs* clientKnobs, IsSi
init( SHARDED_ROCKSDB_MAX_OPEN_FILES, 50000 ); // Should be smaller than OS's fd limit.
init (SHARDED_ROCKSDB_READ_ASYNC_IO, false ); if (isSimulated) SHARDED_ROCKSDB_READ_ASYNC_IO = deterministicRandom()->coinflip();
init( SHARDED_ROCKSDB_PREFIX_LEN, 0 ); if( randomize && BUGGIFY ) SHARDED_ROCKSDB_PREFIX_LEN = deterministicRandom()->randomInt(1, 20);

init ( SHARDED_ROCKSDB_CLEAR_RANGE_COMPACTION_LIMIT, 10 ); if (isSimulated) SHARDED_ROCKSDB_CLEAR_RANGE_COMPACTION_LIMIT = deterministicRandom()->randomInt(0, 100);

// Leader election
bool longLeaderElection = randomize && BUGGIFY;
Expand Down
5 changes: 5 additions & 0 deletions fdbclient/include/fdbclient/IKeyValueStore.actor.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ class IKeyValueStore : public IClosable {
// Adds key range to a physical shard.
virtual Future<Void> addRange(KeyRangeRef range, std::string id, bool active = true) { return Void(); }

// Creates new physical shards for key ranges.
virtual Future<Void> addRanges(std::vector<std::pair<KeyRange, std::string>> ranges, bool active = true) {
return Void();
}

// Removes a key range from KVS and returns a list of empty physical shards after the removal.
virtual std::vector<std::string> removeRange(KeyRangeRef range) { return std::vector<std::string>(); }

Expand Down
1 change: 1 addition & 0 deletions fdbclient/include/fdbclient/ServerKnobs.h
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,7 @@ class SWIFT_CXX_IMMORTAL_SINGLETON_TYPE ServerKnobs : public KnobsImpl<ServerKno
int SHARDED_ROCKSDB_MAX_OPEN_FILES;
bool SHARDED_ROCKSDB_READ_ASYNC_IO;
int SHARDED_ROCKSDB_PREFIX_LEN;
int SHARDED_ROCKSDB_CLEAR_RANGE_COMPACTION_LIMIT;

// Leader election
int MAX_NOTIFICATIONS;
Expand Down
Loading

0 comments on commit cc0f429

Please sign in to comment.