FastRestoreApplier:Add trace to track applying status
This commit is contained in:
parent
9000a4a548
commit
135f6443da
|
@ -463,10 +463,11 @@ ACTOR static Future<Void> handleApplyToDBRequest(RestoreVersionBatchRequest req,
|
|||
|
||||
state bool isDuplicated = true;
|
||||
Reference<ApplierBatchData> batchData = self->batch[req.batchIndex];
|
||||
TraceEvent("FastRestoreApplierPhaseHandleApplyToDB", self->id())
|
||||
TraceEvent("FastRestoreApplierPhaseHandleApplyToDBStart", self->id())
|
||||
.detail("BatchIndex", req.batchIndex)
|
||||
.detail("FinishedBatch", self->finishedBatch.get())
|
||||
.detail("HasStarted", batchData->dbApplier.present())
|
||||
.detail("WroteToDB", batchData->dbApplier.present() ? batchData->dbApplier.get().isReady() : "No")
|
||||
.detail("PreviousVersionBatchState", batchData->vbState.get());
|
||||
batchData->vbState = ApplierVersionBatchState::WRITE_TO_DB;
|
||||
if (self->finishedBatch.get() == req.batchIndex - 1) {
|
||||
|
@ -493,6 +494,14 @@ ACTOR static Future<Void> handleApplyToDBRequest(RestoreVersionBatchRequest req,
|
|||
}
|
||||
req.reply.send(RestoreCommonReply(self->id(), isDuplicated));
|
||||
|
||||
TraceEvent("FastRestoreApplierPhaseHandleApplyToDBStart", self->id())
|
||||
.detail("BatchIndex", req.batchIndex)
|
||||
.detail("FinishedBatch", self->finishedBatch.get())
|
||||
.detail("HasStarted", batchData->dbApplier.present())
|
||||
.detail("WroteToDB", batchData->dbApplier.present() ? batchData->dbApplier.get().isReady() : "No")
|
||||
.detail("PreviousVersionBatchState", batchData->vbState.get());
|
||||
batchData->vbState = ApplierVersionBatchState::DONE;
|
||||
|
||||
return Void();
|
||||
}
|
||||
|
||||
|
|
|
@ -218,7 +218,8 @@ public:
|
|||
static const int INIT = 1;
|
||||
static const int RECEIVE_MUTATIONS = 2;
|
||||
static const int WRITE_TO_DB = 3;
|
||||
static const int INVALID = 4;
|
||||
static const int DONE = 4;
|
||||
static const int INVALID = 5;
|
||||
|
||||
explicit ApplierVersionBatchState(int newState) {
|
||||
vbState = newState;
|
||||
|
|
Loading…
Reference in New Issue