Clean up dd traces (#11090)

* Clean up DD traces.

* clean up dd traces.
This commit is contained in:
He Liu 2023-12-06 15:53:04 -08:00 committed by GitHub
parent 83e1f8ab7b
commit 29eab90528
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 9 deletions

View File

@ -1099,6 +1099,7 @@ void DDQueue::launchQueuedWork(std::set<RelocateData, std::greater<RelocateData>
rrs.dmReason);
TraceEvent(SevInfo, "NewDataMoveWithRandomDestID")
.detail("DataMoveID", rrs.dataMoveId.toString())
.detail("TrackID", rrs.randomId)
.detail("Range", rrs.keys)
.detail("Reason", rrs.reason.toString())
.detail("DataMoveReason", static_cast<int>(rrs.dmReason));
@ -1433,6 +1434,7 @@ ACTOR Future<Void> dataDistributionRelocator(DDQueue* self,
// getting the destination team or we could miss failure notifications for the storage
// servers in the destination team
TraceEvent("BestTeamNotReady")
.detail("TraceID", rd.randomId)
.detail("TeamCollectionIndex", tciIndex)
.detail("RestoreDataMoveForDest",
describe(tciIndex == 0 ? rd.dataMove->primaryDest : rd.dataMove->remoteDest));
@ -1630,6 +1632,7 @@ ACTOR Future<Void> dataDistributionRelocator(DDQueue* self,
destOverloadedCount++;
TraceEvent(destOverloadedCount > 50 ? SevInfo : SevDebug, "DestSSBusy", distributorId)
.suppressFor(1.0)
.detail("TraceID", rd.randomId)
.detail("StuckCount", stuckCount)
.detail("DestOverloadedCount", destOverloadedCount)
.detail("TeamCollectionId", tciIndex)
@ -1647,6 +1650,7 @@ ACTOR Future<Void> dataDistributionRelocator(DDQueue* self,
stuckCount++;
TraceEvent(stuckCount > 50 ? SevWarnAlways : SevWarn, "BestTeamStuck", distributorId)
.suppressFor(1.0)
.detail("TraceID", rd.randomId)
.detail("StuckCount", stuckCount)
.detail("DestOverloadedCount", destOverloadedCount)
.detail("TeamCollectionId", tciIndex)

View File

@ -1818,7 +1818,7 @@ ACTOR static Future<Void> startMoveShards(Database occ,
checkpoint.setState(CheckpointMetaData::Pending);
tr.set(checkpointKeyFor(checkpointId), checkpointValue(checkpoint));
dataMove.checkpoints.insert(checkpointId);
TraceEvent(sevDm, "InitiatedCheckpoint")
TraceEvent(sevDm, "InitiatedCheckpoint", relocationIntervalId)
.detail("CheckpointID", checkpointId.toString())
.detail("Range", rangeIntersectKeys)
.detail("DataMoveID", dataMoveId)
@ -1845,12 +1845,12 @@ ACTOR static Future<Void> startMoveShards(Database occ,
if (currentKeys.end == keys.end) {
dataMove.setPhase(DataMoveMetaData::Running);
complete = true;
TraceEvent(sevDm, "StartMoveShardsDataMoveComplete", dataMoveId)
TraceEvent(sevDm, "StartMoveShardsDataMoveComplete", relocationIntervalId)
.detail("DataMoveID", dataMoveId)
.detail("DataMove", dataMove.toString());
} else {
dataMove.setPhase(DataMoveMetaData::Prepare);
TraceEvent(sevDm, "StartMoveShardsDataMovePartial", dataMoveId)
TraceEvent(sevDm, "StartMoveShardsDataMovePartial", relocationIntervalId)
.detail("DataMoveID", dataMoveId)
.detail("CurrentRange", currentKeys)
.detail("DataMoveRange", keys)
@ -1863,7 +1863,7 @@ ACTOR static Future<Void> startMoveShards(Database occ,
wait(tr.commit());
TraceEvent(sevDm, "DataMoveMetaDataCommit", dataMove.id)
TraceEvent(sevDm, "DataMoveMetaDataCommit", relocationIntervalId)
.detail("DataMoveID", dataMoveId)
.detail("DataMoveKey", dataMoveKeyFor(dataMoveId))
.detail("CommitVersion", tr.getCommittedVersion())
@ -1889,7 +1889,7 @@ ACTOR static Future<Void> startMoveShards(Database occ,
runPreCheck = false;
wait(delay(1));
} else {
TraceEvent(SevWarn, "StartMoveShardsError", dataMoveId)
TraceEvent(SevWarn, "StartMoveShardsError", relocationIntervalId)
.errorUnsuppressed(e)
.detail("DataMoveID", dataMoveId)
.detail("DataMoveRange", keys)
@ -2253,7 +2253,7 @@ ACTOR static Future<Void> finishMoveShards(Database occ,
range,
allKeys,
destHasServer ? serverKeysValue(dataMoveId) : serverKeysFalse));
TraceEvent(sevDm, "FinishMoveShardsSetServerKeyRange", dataMoveId)
TraceEvent(sevDm, "FinishMoveShardsSetServerKeyRange", relocationIntervalId)
.detail("StorageServerID", ssId)
.detail("KeyRange", range)
.detail("ShardID", destHasServer ? dataMoveId : UID());
@ -2265,10 +2265,10 @@ ACTOR static Future<Void> finishMoveShards(Database occ,
wait(deleteCheckpoints(&tr, dataMove.checkpoints, dataMoveId));
tr.clear(dataMoveKeyFor(dataMoveId));
complete = true;
TraceEvent(sevDm, "FinishMoveShardsDeleteMetaData", dataMoveId)
TraceEvent(sevDm, "FinishMoveShardsDeleteMetaData", relocationIntervalId)
.detail("DataMove", dataMove.toString());
} else {
TraceEvent(SevInfo, "FinishMoveShardsPartialComplete", dataMoveId)
TraceEvent(SevInfo, "FinishMoveShardsPartialComplete", relocationIntervalId)
.detail("DataMoveID", dataMoveId)
.detail("CurrentRange", range)
.detail("NewDataMoveMetaData", dataMove.toString());
@ -2280,7 +2280,8 @@ ACTOR static Future<Void> finishMoveShards(Database occ,
// Post validate consistency of update of keyServers and serverKeys
if (SERVER_KNOBS->AUDIT_DATAMOVE_POST_CHECK) {
wait(auditLocationMetadataPostCheck(occ, range, "finishMoveShards_postcheck", dataMoveId));
wait(auditLocationMetadataPostCheck(
occ, range, "finishMoveShards_postcheck", relocationIntervalId));
}
if (complete) {