Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions fdbclient/ServerKnobs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1118,6 +1118,7 @@ void ServerKnobs::initialize(Randomize randomize, ClientKnobs* clientKnobs, IsSi
init( PHYSICAL_SHARD_MOVE_LOG_SEVERITY, 1 );
init( FETCH_SHARD_BUFFER_BYTE_LIMIT, 20e6 ); if( randomize && BUGGIFY ) FETCH_SHARD_BUFFER_BYTE_LIMIT = 1;
init( FETCH_SHARD_UPDATES_BYTE_LIMIT, 2500000 ); if( randomize && BUGGIFY ) FETCH_SHARD_UPDATES_BYTE_LIMIT = 100;
init( SS_ENCODE_ID_IN_AVAILABLE_STATUS, false ); if ( isSimulated ) SS_ENCODE_ID_IN_AVAILABLE_STATUS = deterministicRandom()->coinflip();

//Wait Failure
init( MAX_OUTSTANDING_WAIT_FAILURE_REQUESTS, 250 ); if( randomize && BUGGIFY ) MAX_OUTSTANDING_WAIT_FAILURE_REQUESTS = 2;
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 @@ -1157,6 +1157,7 @@ class SWIFT_CXX_IMMORTAL_SINGLETON_TYPE ServerKnobs : public KnobsImpl<ServerKno
int PHYSICAL_SHARD_MOVE_LOG_SEVERITY;
int FETCH_SHARD_BUFFER_BYTE_LIMIT;
int FETCH_SHARD_UPDATES_BYTE_LIMIT;
bool SS_ENCODE_ID_IN_AVAILABLE_STATUS;

// Wait Failure
int MAX_OUTSTANDING_WAIT_FAILURE_REQUESTS;
Expand Down
6 changes: 6 additions & 0 deletions fdbclient/include/fdbclient/StorageCheckpoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ struct DataMoveMetaData {
int16_t phase; // DataMoveMetaData::Phase.
int8_t mode;
Optional<BulkLoadTaskState> bulkLoadTaskState; // set if the data move is a bulk load data move
Optional<std::unordered_map<std::string, std::string>> dcTeamIds;

DataMoveMetaData() = default;
DataMoveMetaData(UID id, Version version, KeyRange range) : id(id), version(version), priority(0), mode(0) {
Expand All @@ -189,6 +190,11 @@ struct DataMoveMetaData {
}
DataMoveMetaData(UID id) : id(id), version(invalidVersion), priority(0), mode(0) {}

DataMoveMetaData(UID id, KeyRange range, std::unordered_map<std::string, std::string> teamIds) {
ranges.push_back(range);
dcTeamIds = teamIds;
}

Phase getPhase() const { return static_cast<Phase>(phase); }

void setPhase(Phase phase) { this->phase = static_cast<int16_t>(phase); }
Expand Down
2 changes: 1 addition & 1 deletion fdbclient/include/fdbclient/StorageServerShard.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ struct StorageServerShard {

template <class Ar>
void serialize(Ar& ar) {
serializer(ar, range, version, id, desiredId, shardState, moveInShardId);
serializer(ar, range, version, id, desiredId, shardState, moveInShardId, dataMoveId, teamId);
}

KeyRange range;
Expand Down
5 changes: 5 additions & 0 deletions fdbserver/MoveKeys.actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3404,6 +3404,11 @@ void seedShardServers(Arena& arena, CommitTransactionRef& tr, std::vector<Storag
ksValue = keyServersValue(serverSrcUID, /*dest=*/std::vector<UID>(), shardId, UID());
krmSetPreviouslyEmptyRange(tr, arena, keyServersPrefix, KeyRangeRef(KeyRef(), allKeys.end), ksValue, Value());

// Set DataMoveMetaData for seed data move. Team id will be read by seed servers.
// TODO: clean up data move metadata for initial moves.
DataMoveMetaData metadata(shardId, allKeys);
tr.set(dataMoveKeyFor(shardId), dataMoveValue(metadata));

for (auto& s : servers) {
krmSetPreviouslyEmptyRange(
tr, arena, serverKeysPrefixFor(s.id()), allKeys, serverKeysValue(shardId), serverKeysFalse);
Expand Down
Loading