mirror of
https://github.com/apple/foundationdb.git
synced 2025-05-21 22:33:17 +08:00
FastRestore:fix:loader can receive reply from vb that has been processed and deleted
This commit is contained in:
parent
22a2fac689
commit
d9ea14ea6c
@ -109,7 +109,7 @@ ACTOR Future<Void> restoreApplierCore(RestoreApplierInterface applierInterf, int
|
|||||||
// Only one actor can process mutations from the same file.
|
// Only one actor can process mutations from the same file.
|
||||||
ACTOR static Future<Void> handleSendMutationVectorRequest(RestoreSendVersionedMutationsRequest req,
|
ACTOR static Future<Void> handleSendMutationVectorRequest(RestoreSendVersionedMutationsRequest req,
|
||||||
Reference<RestoreApplierData> self) {
|
Reference<RestoreApplierData> self) {
|
||||||
state Reference<ApplierBatchData> batchData; // initiallized as nullptr
|
state Reference<ApplierBatchData> batchData; // initialized as nullptr
|
||||||
state bool printTrace = false;
|
state bool printTrace = false;
|
||||||
state NotifiedVersion* curMsgIndex = nullptr;
|
state NotifiedVersion* curMsgIndex = nullptr;
|
||||||
|
|
||||||
|
@ -834,11 +834,21 @@ ACTOR Future<Void> sendMutationsToApplier(
|
|||||||
wait(waitForAll(fSends));
|
wait(waitForAll(fSends));
|
||||||
|
|
||||||
(*inflightSendLoadParamReqs)[batchIndex]--;
|
(*inflightSendLoadParamReqs)[batchIndex]--;
|
||||||
kvOps = VersionedMutationsMap(); // Free memory for parsed mutations at the restore asset.
|
|
||||||
TraceEvent("FastRestoreLoaderSendMutationToApplierDone")
|
if (batchIndex < finishedBatch->get()) {
|
||||||
.detail("BatchIndex", batchIndex)
|
kvOps = VersionedMutationsMap(); // Free memory for parsed mutations at the restore asset.
|
||||||
.detail("RestoreAsset", asset.toString())
|
TraceEvent("FastRestoreLoaderSendMutationToApplierDone")
|
||||||
.detail("Mutations", kvCount);
|
.detail("BatchIndex", batchIndex)
|
||||||
|
.detail("RestoreAsset", asset.toString())
|
||||||
|
.detail("Mutations", kvCount);
|
||||||
|
} else {
|
||||||
|
TraceEvent(SevWarnAlways, "FastRestoreLoaderSendMutationToApplierDoneTooLate")
|
||||||
|
.detail("BatchIndex", batchIndex)
|
||||||
|
.detail("FinishedBatchIndex", finishedBatch->get())
|
||||||
|
.detail("RestoreAsset", asset.toString())
|
||||||
|
.detail("Mutations", kvCount);
|
||||||
|
}
|
||||||
|
|
||||||
return Void();
|
return Void();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user