From 33c4be9c42764c4442ea9ad1b3416a97e98899bb Mon Sep 17 00:00:00 2001 From: Meng Xu Date: Tue, 31 Mar 2020 16:00:51 -0700 Subject: [PATCH] Improve debug message for debug mutations --- fdbserver/RestoreApplier.actor.cpp | 4 ++-- fdbserver/RestoreApplier.actor.h | 2 ++ fdbserver/RestoreLoader.actor.cpp | 6 +++--- fdbserver/RestoreUtil.h | 4 ++-- fdbserver/fdbserver.actor.cpp | 2 +- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/fdbserver/RestoreApplier.actor.cpp b/fdbserver/RestoreApplier.actor.cpp index 9b92b16b4c..bd985fcb34 100644 --- a/fdbserver/RestoreApplier.actor.cpp +++ b/fdbserver/RestoreApplier.actor.cpp @@ -233,13 +233,13 @@ ACTOR static Future getAndComputeStagingKeys( int i = 0; for (auto& key : incompleteStagingKeys) { if (!fValues[i].get().present()) { - TraceEvent(SevWarnAlways, "FastRestoreApplierGetAndComputeStagingKeysUnhandledError") + TraceEvent(SevError, "FastRestoreApplierGetAndComputeStagingKeysUnhandledError") .detail("Key", key.first) .detail("Reason", "Not found in DB") .detail("PendingMutations", key.second->second.pendingMutations.size()) .detail("StagingKeyType", (int)key.second->second.type); for (auto& vm : key.second->second.pendingMutations) { - TraceEvent(SevWarnAlways, "FastRestoreApplierGetAndComputeStagingKeysUnhandledError") + TraceEvent(SevError, "FastRestoreApplierGetAndComputeStagingKeysUnhandledError") .detail("PendingMutationVersion", vm.first.toString()) .detail("PendingMutation", vm.second.toString()); } diff --git a/fdbserver/RestoreApplier.actor.h b/fdbserver/RestoreApplier.actor.h index 2d2cf69d1c..d342210054 100644 --- a/fdbserver/RestoreApplier.actor.h +++ b/fdbserver/RestoreApplier.actor.h @@ -105,6 +105,8 @@ struct StagingKey { void precomputeResult() { TraceEvent(SevDebug, "FastRestoreApplierPrecomputeResult") .detail("Key", key) + .detail("Value", val) + .detail("MType", typeString[(int)type]) .detail("Version", version.toString()) .detail("LargestPendingVersion", (pendingMutations.empty() ? "[none]" : pendingMutations.rbegin()->first.toString())); diff --git a/fdbserver/RestoreLoader.actor.cpp b/fdbserver/RestoreLoader.actor.cpp index a8391dfceb..6a86be773f 100644 --- a/fdbserver/RestoreLoader.actor.cpp +++ b/fdbserver/RestoreLoader.actor.cpp @@ -202,7 +202,7 @@ ACTOR static Future _parsePartitionedLogFileOnLoader( mutation.param2 = mutation.param2 < asset.range.end ? mutation.param2 : asset.range.end; } - TraceEvent(SevFRMutationInfo, "FastRestore_VerboseDebug") + TraceEvent(SevFRMutationInfo, "FastRestoreDecodePartitionedLogFile") .detail("CommitVersion", msgVersion.toString()) .detail("ParsedMutation", mutation.toString()); it->second.push_back_deep(it->second.arena(), mutation); @@ -721,7 +721,7 @@ void _parseSerializedMutation(std::map::ite cc->sampledLogBytes += mutation.totalSize(); - TraceEvent(SevFRMutationInfo, "FastRestore_VerboseDebug") + TraceEvent(SevFRMutationInfo, "FastRestoreDecodeLogFile") .detail("CommitVersion", commitVersion) .detail("ParsedMutation", mutation.toString()); @@ -810,7 +810,7 @@ ACTOR static Future _parseRangeFileToMutationsOnLoader( // We cache all kv operations into kvOps, and apply all kv operations later in one place auto it = kvOps.insert(std::make_pair(msgVersion, MutationsVec())); - TraceEvent(SevFRMutationInfo, "FastRestore_VerboseDebug") + TraceEvent(SevFRMutationInfo, "FastRestoreDecodeRangeFile") .detail("CommitVersion", version) .detail("ParsedMutationKV", m.toString()); diff --git a/fdbserver/RestoreUtil.h b/fdbserver/RestoreUtil.h index 683d785fc2..f120f18fd0 100644 --- a/fdbserver/RestoreUtil.h +++ b/fdbserver/RestoreUtil.h @@ -35,8 +35,8 @@ #include #include -#define SevFRMutationInfo SevVerbose -//#define SevFRMutationInfo SevInfo +//#define SevFRMutationInfo SevVerbose +#define SevFRMutationInfo SevInfo using MutationsVec = Standalone>; using SubSequenceVec = Standalone>; diff --git a/fdbserver/fdbserver.actor.cpp b/fdbserver/fdbserver.actor.cpp index 437ec78f25..df94ef669f 100644 --- a/fdbserver/fdbserver.actor.cpp +++ b/fdbserver/fdbserver.actor.cpp @@ -201,7 +201,7 @@ bool enableFailures = true; vector< Standalone> > debugEntries; int64_t totalDebugEntriesSize = 0; -#if CENABLED(0, NOT_IN_CLEAN) +#if CENABLED(1, NOT_IN_CLEAN) StringRef debugKey = LiteralStringRef( "" ); StringRef debugKey2 = LiteralStringRef( "\xff\xff\xff\xff" );