FastRestore:Send log mutations and range mutations in parallel

With the subversion extension, appliers can order log and range mutations
based on LogMessageVersion instead of sending order.
This commit is contained in:
Meng Xu 2020-03-27 16:54:17 -07:00
parent f7233bade7
commit 0222e8096c
1 changed files with 4 additions and 5 deletions

View File

@ -525,11 +525,10 @@ ACTOR static Future<Void> distributeWorkloadPerVersionBatch(Reference<RestoreMas
ASSERT(batchData->rangeToApplier.empty());
splitKeyRangeForAppliers(batchData, self->appliersInterf, batchIndex);
// Loaders should ensure log files' mutations sent to appliers before range files' mutations
// TODO: Let applier buffer mutations from log and range files differently so that loaders can send mutations in
// parallel
wait(sendMutationsFromLoaders(batchData, batchStatus, self->loadersInterf, batchIndex, false));
wait(sendMutationsFromLoaders(batchData, batchStatus, self->loadersInterf, batchIndex, true));
// Ask loaders to send parsed mutations to appliers;
// log mutations should be applied before range mutations at the same version, which is ensured by LogMessageVersion
wait(sendMutationsFromLoaders(batchData, batchStatus, self->loadersInterf, batchIndex, false) &&
sendMutationsFromLoaders(batchData, batchStatus, self->loadersInterf, batchIndex, true));
// Synchronization point for version batch pipelining.
// self->finishedBatch will continuously increase by 1 per version batch.