FastRestore:Cosmetic code style improvement
Also mute some trace events
This commit is contained in:
parent
94b1e17a96
commit
c13ba7aeb4
|
@ -2225,7 +2225,7 @@ ACTOR Future<Void> runFastRestoreAgent(Database db, std::string tagName, std::st
|
|||
.detail("RestoreUID", randomUID);
|
||||
wait(backupAgent.submitParallelRestore(db, KeyRef(tagName), ranges, KeyRef(container), dbVersion, true,
|
||||
randomUID, LiteralStringRef(""), LiteralStringRef("")));
|
||||
ASSERT(false); // TODO: Support addPrefix and removePrefix
|
||||
// TODO: Support addPrefix and removePrefix
|
||||
if (waitForDone) {
|
||||
// Wait for parallel restore to finish and unlock DB after that
|
||||
TraceEvent("FastRestoreAgent").detail("BackupAndParallelRestore", "WaitForRestoreToFinish");
|
||||
|
|
|
@ -3669,7 +3669,7 @@ public:
|
|||
TraceEvent("FastRestoreAgentSubmitRestoreRequests").detail("DBIsLocked", randomUID);
|
||||
break;
|
||||
} catch (Error& e) {
|
||||
TraceEvent(numTries > 50 ? SevError : SevWarnAlways, "FastRestoreAgentSubmitRestoreRequestsMayFail")
|
||||
TraceEvent(numTries > 50 ? SevError : SevInfo, "FastRestoreAgentSubmitRestoreRequestsMayFail")
|
||||
.detail("Reason", "DB is not properly locked")
|
||||
.detail("ExpectedLockID", randomUID)
|
||||
.error(e);
|
||||
|
@ -3700,7 +3700,7 @@ public:
|
|||
wait(tr->commit()); // Trigger restore
|
||||
break;
|
||||
} catch (Error& e) {
|
||||
TraceEvent(numTries > 50 ? SevError : SevWarnAlways, "FastRestoreAgentSubmitRestoreRequestsRetry")
|
||||
TraceEvent(numTries > 50 ? SevError : SevInfo, "FastRestoreAgentSubmitRestoreRequestsRetry")
|
||||
.detail("RestoreIndex", restoreIndex)
|
||||
.error(e);
|
||||
numTries++;
|
||||
|
@ -4728,7 +4728,7 @@ static std::pair<bool, bool> insideValidRange(KeyValueRef kv, Standalone<VectorR
|
|||
bool insideRestoreRange = false;
|
||||
bool insideBackupRange = false;
|
||||
for (auto& range : restoreRanges) {
|
||||
TraceEvent("InsideValidRestoreRange")
|
||||
TraceEvent(SevFRTestInfo, "InsideValidRestoreRange")
|
||||
.detail("Key", kv.key)
|
||||
.detail("Range", range)
|
||||
.detail("Inside", (kv.key >= range.begin && kv.key < range.end));
|
||||
|
@ -4738,7 +4738,7 @@ static std::pair<bool, bool> insideValidRange(KeyValueRef kv, Standalone<VectorR
|
|||
}
|
||||
}
|
||||
for (auto& range : backupRanges) {
|
||||
TraceEvent("InsideValidBackupRange")
|
||||
TraceEvent(SevFRTestInfo, "InsideValidBackupRange")
|
||||
.detail("Key", kv.key)
|
||||
.detail("Range", range)
|
||||
.detail("Inside", (kv.key >= range.begin && kv.key < range.end));
|
||||
|
@ -4836,7 +4836,7 @@ ACTOR static Future<Void> transformDatabaseContents(Database cx, Key addPrefix,
|
|||
.detail("Index", i)
|
||||
.detail("GetKey", oldData[i].key)
|
||||
.detail("GetValue", oldData[i].value);
|
||||
if (newKey.size() < removePrefix.size()) { // If true, must check why?!
|
||||
if (newKey.size() < removePrefix.size()) { // If true, must check why.
|
||||
TraceEvent(SevError, "TransformDatabaseContents")
|
||||
.detail("Key", newKey)
|
||||
.detail("RemovePrefix", removePrefix);
|
||||
|
@ -4962,4 +4962,4 @@ ACTOR Future<Void> transformRestoredDatabase(Database cx, Standalone<VectorRef<K
|
|||
}
|
||||
|
||||
return Void();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -755,7 +755,8 @@ void _parseSerializedMutation(KeyRangeMap<Version>* pRangeVersions,
|
|||
MutationsVec& samples = samplesIter->second;
|
||||
SerializedMutationListMap& mutationMap = *pmutationMap;
|
||||
|
||||
TraceEvent("FastRestoreLoaderParseSerializedLogMutation").detail("RestoreAsset", asset.toString());
|
||||
TraceEvent(SevFRMutationInfo, "FastRestoreLoaderParseSerializedLogMutation")
|
||||
.detail("RestoreAsset", asset.toString());
|
||||
|
||||
Arena tempArena;
|
||||
for (auto& m : mutationMap) {
|
||||
|
|
|
@ -504,7 +504,6 @@ struct BackupAndParallelRestoreCorrectnessWorkload : TestWorkload {
|
|||
state std::vector<Standalone<StringRef>> restoreTags;
|
||||
|
||||
// Submit parallel restore requests
|
||||
// TODO: Add addPrefix and removePrefix feature
|
||||
TraceEvent("BackupAndParallelRestoreWorkload")
|
||||
.detail("PrepareRestores", self->backupRanges.size())
|
||||
.detail("AddPrefix", self->addPrefix)
|
||||
|
|
Loading…
Reference in New Issue