From cc66466ef303c6091e9766b214103560dd3ee57b Mon Sep 17 00:00:00 2001 From: Evan Tschannen Date: Thu, 18 Mar 2021 18:50:18 -0700 Subject: [PATCH] more logging --- fdbserver/DiskQueue.actor.cpp | 10 ++++++---- fdbserver/TLogServer.actor.cpp | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/fdbserver/DiskQueue.actor.cpp b/fdbserver/DiskQueue.actor.cpp index 4678f3de13..7b7e66f783 100644 --- a/fdbserver/DiskQueue.actor.cpp +++ b/fdbserver/DiskQueue.actor.cpp @@ -122,7 +122,9 @@ private: ACTOR static Future waitAndSync(SyncQueue* self) { wait(self->outstanding.front()); self->outstanding.pop_front(); + TraceEvent("FileSyncStart").detail("Name", self->file->getFilename()); wait(self->file->sync()); + TraceEvent("FileSyncEnd").detail("Name", self->file->getFilename()); return Void(); } }; @@ -479,9 +481,9 @@ public: self->updatePopped(poppedPages * sizeof(Page)); - /*TraceEvent("RDQCommitEnd", self->dbgid).detail("DeltaPopped", poppedPages*sizeof(Page)).detail("PoppedCommitted", self->dbg_file0BeginSeq + self->files[0].popped + self->files[1].popped) + TraceEvent("RDQCommitEnd", self->dbgid).detail("DeltaPopped", poppedPages*sizeof(Page)).detail("PoppedCommitted", self->dbg_file0BeginSeq + self->files[0].popped + self->files[1].popped) .detail("File0Size", self->files[0].size).detail("File1Size", self->files[1].size) - .detail("File0Name", self->files[0].dbgFilename).detail("SyncedFiles", syncFiles.size());*/ + .detail("File0Name", self->files[0].dbgFilename).detail("SyncedFiles", syncFiles.size()); committed.send(Void()); } catch (Error& e) { @@ -964,10 +966,10 @@ public: warnAlwaysForMemory = false; } - /*TraceEvent("DQCommit", dbgid).detail("Pages", pushedPageCount()).detail("LastPoppedSeq", lastPoppedSeq).detail("PoppedSeq", poppedSeq).detail("NextPageSeq", nextPageSeq) + TraceEvent("DQCommit", dbgid).detail("Pages", pushedPageCount()).detail("LastPoppedSeq", lastPoppedSeq).detail("PoppedSeq", poppedSeq).detail("NextPageSeq", nextPageSeq) .detail("RawFile0Size", rawQueue->files[0].size).detail("RawFile1Size", rawQueue->files[1].size).detail("WritingPos", rawQueue->writingPos) .detail("RawFile0Name", - rawQueue->files[0].dbgFilename);*/ + rawQueue->files[0].dbgFilename); lastCommittedSeq = backPage().endSeq(); auto f = rawQueue->pushAndCommit( diff --git a/fdbserver/TLogServer.actor.cpp b/fdbserver/TLogServer.actor.cpp index dd22c66e83..91929cd264 100644 --- a/fdbserver/TLogServer.actor.cpp +++ b/fdbserver/TLogServer.actor.cpp @@ -760,7 +760,7 @@ void TLogQueue::push(T const& qe, Reference logData) { const IDiskQueue::location startloc = queue->getNextPushLocation(); // FIXME: push shouldn't return anything. We should call getNextPushLocation() again. const IDiskQueue::location endloc = queue->push(wr.toValue()); - //TraceEvent("TLogQueueVersionWritten", dbgid).detail("Size", wr.getLength() - sizeof(uint32_t) - sizeof(uint8_t)).detail("Loc", loc); + TraceEvent("TLogQueueVersionWritten", dbgid).detail("Size", wr.getLength() - sizeof(uint32_t) - sizeof(uint8_t)).detail("Start", startloc).detail("End", endloc).detail("Ver", qe.version); logData->versionLocation[qe.version] = std::make_pair(startloc, endloc); }