Skip to content
Open
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 @@ -969,6 +969,7 @@ void ServerKnobs::initialize(Randomize randomize, ClientKnobs* clientKnobs, IsSi
init( DD_PREFER_LOW_READ_UTIL_TEAM, true );
init( DD_TRACE_MOVE_BYTES_AVERAGE_INTERVAL, 120);
init( MOVING_WINDOW_SAMPLE_SIZE, 10000000); // 10MB
init( DD_GET_TEAM_BY_SERVERS_WAIT_INTERVAL, 1); // 1s

//Storage Server
init( STORAGE_LOGGING_DELAY, 5.0 );
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 @@ -986,6 +986,7 @@ class ServerKnobs : public KnobsImpl<ServerKnobs> {
// Rolling window duration over which the average bytes moved by DD is calculated for the 'MovingData' trace event.
double DD_TRACE_MOVE_BYTES_AVERAGE_INTERVAL;
int64_t MOVING_WINDOW_SAMPLE_SIZE;
int64_t DD_GET_TEAM_BY_SERVERS_WAIT_INTERVAL;

// Storage Server
double STORAGE_LOGGING_DELAY;
Expand Down
5 changes: 3 additions & 2 deletions fdbserver/DDRelocationQueue.actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ DataMovementReason priorityToDataMovementReason(int priority) {
RelocateData::RelocateData()
: priority(-1), boundaryPriority(-1), healthPriority(-1), reason(RelocateReason::OTHER), startTime(-1),
dataMoveId(anonymousShardId), workFactor(0), wantsNewServers(false), cancellable(false),
interval("QueuedRelocation"){};
interval("QueuedRelocation") {};

RelocateData::RelocateData(RelocateShard const& rs)
: keys(rs.keys), priority(rs.priority), boundaryPriority(isBoundaryPriority(rs.priority) ? rs.priority : -1),
Expand Down Expand Up @@ -215,7 +215,7 @@ class ParallelTCInfo final : public ReferenceCounted<ParallelTCInfo>, public IDa

public:
ParallelTCInfo() = default;
explicit ParallelTCInfo(ParallelTCInfo const& info) : teams(info.teams), tempServerIDs(info.tempServerIDs){};
explicit ParallelTCInfo(ParallelTCInfo const& info) : teams(info.teams), tempServerIDs(info.tempServerIDs) {};

void addTeam(Reference<IDataDistributionTeam> team) { teams.push_back(team); }

Expand Down Expand Up @@ -1401,6 +1401,7 @@ ACTOR Future<Void> dataDistributionRelocator(DDQueue* self,
if (SERVER_KNOBS->SHARD_ENCODE_LOCATION_METADATA && rd.isRestore()) {
auto req = GetTeamRequest(tciIndex == 0 ? rd.dataMove->primaryDest : rd.dataMove->remoteDest);
req.keys = rd.keys;
TraceEvent("GetTeamRequestCalled").suppressFor(1.0).detail("DataMoveID", rd.dataMoveId);
Future<std::pair<Optional<Reference<IDataDistributionTeam>>, bool>> fbestTeam =
brokenPromiseToNever(self->teamCollections[tciIndex].getTeam.getReply(req));
bestTeamReady = fbestTeam.isReady();
Expand Down
9 changes: 9 additions & 0 deletions fdbserver/DDTeamCollection.actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,8 @@ class DDTeamCollectionImpl {

// Find the team with the exact storage servers as req.src.
static void getTeamByServers(DDTeamCollection* self, GetTeamRequest req) {
TraceEvent("GetTeamByServersStart").suppressFor(1.0);
double currTime = now();
const std::string servers = TCTeamInfo::serversToString(req.src);
Optional<Reference<IDataDistributionTeam>> res;
for (const auto& team : self->teams) {
Expand All @@ -193,6 +195,12 @@ class DDTeamCollectionImpl {
break;
}
}
TraceEvent("GetTeamByServersEnd")
.suppressFor(1.0)
.detail("TeamsSize", self->teams.size())
.detail("TimeElapsed", now() - currTime)
.detail("Servers", servers)
.detail("Result", res.present());
req.reply.send(std::make_pair(res, false));
}

Expand Down Expand Up @@ -3078,6 +3086,7 @@ class DDTeamCollectionImpl {
GetTeamRequest req = waitNext(tci.getTeam.getFuture());
if (req.findTeamByServers) {
getTeamByServers(self, req);
wait(delay(SERVER_KNOBS->DD_GET_TEAM_BY_SERVERS_WAIT_INTERVAL));
} else {
self->addActor.send(self->getTeam(req));
}
Expand Down
3 changes: 2 additions & 1 deletion fdbserver/MoveKeys.actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1858,7 +1858,8 @@ ACTOR static Future<Void> startMoveShards(Database occ,

wait(tr.commit());

TraceEvent(sevDm, "DataMoveMetaDataCommit", dataMove.id)
TraceEvent("DataMoveMetaDataCommit", dataMove.id)
.suppressFor(1.0)
.detail("DataMoveID", dataMoveId)
.detail("DataMoveKey", dataMoveKeyFor(dataMoveId))
.detail("CommitVersion", tr.getCommittedVersion())
Expand Down