diff --git a/fdbserver/RestoreLoader.actor.cpp b/fdbserver/RestoreLoader.actor.cpp index 91a3c03afb..e778361923 100644 --- a/fdbserver/RestoreLoader.actor.cpp +++ b/fdbserver/RestoreLoader.actor.cpp @@ -260,16 +260,16 @@ ACTOR Future handleSendMutationsRequest(RestoreSendMutationsToAppliersRequ } if (!isDuplicated) { + vector> fSendMutations; batchData->rangeToApplier = req.rangeToApplier; for (; item != batchData->kvOpsPerLP.end(); item++) { if (item->first.isRangeFile == req.useRangeFile) { // Send the parsed mutation to applier who will apply the mutation to DB - // TODO: Change to parallel sending - // TODO: item should based on batchIndex - wait(sendMutationsToApplier(&item->second, req.batchIndex, item->first.asset, item->first.isRangeFile, + fSendMutations.push_back(sendMutationsToApplier(&item->second, req.batchIndex, item->first.asset, item->first.isRangeFile, &batchData->rangeToApplier, &self->appliersInterf)); } } + wait(waitForAll(fSendMutations)); if (req.useRangeFile) { batchStatus->sendAllRanges = Void(); // Finish sending kvs parsed from range files } else {