mirror of
https://github.com/apple/foundationdb.git
synced 2025-06-02 19:25:52 +08:00
FastRestore:Add comment for integrating with new backup format
This commit is contained in:
parent
3801e50288
commit
d3071409c5
@ -612,6 +612,11 @@ void _parseSerializedMutation(std::map<LoadingParam, VersionedMutationsMap>::ite
|
||||
}
|
||||
|
||||
// Parsing the data blocks in a range file
|
||||
// kvOpsIter: saves the parsed versioned-mutations for the sepcific LoadingParam;
|
||||
// samplesIter: saves the sampled mutations from the parsed versioned-mutations;
|
||||
// bc: backup container to read the backup file
|
||||
// version: the version the parsed mutations should be at
|
||||
// asset: RestoreAsset about which backup data should be parsed
|
||||
ACTOR static Future<Void> _parseRangeFileToMutationsOnLoader(
|
||||
std::map<LoadingParam, VersionedMutationsMap>::iterator kvOpsIter,
|
||||
std::map<LoadingParam, MutationsVec>::iterator samplesIter, LoaderCounters* cc, Reference<IBackupContainer> bc,
|
||||
@ -691,9 +696,12 @@ ACTOR static Future<Void> _parseRangeFileToMutationsOnLoader(
|
||||
return Void();
|
||||
}
|
||||
|
||||
// Parse data blocks in a log file into a vector of <string, string> pairs. Each pair.second contains the mutations at a
|
||||
// version encoded in pair.first Step 1: decodeLogFileBlock into <string, string> pairs Step 2: Concatenate the
|
||||
// pair.second of pairs with the same pair.first.
|
||||
// Parse data blocks in a log file into a vector of <string, string> pairs.
|
||||
// Each pair.second contains the mutations at a version encoded in pair.first;
|
||||
// Step 1: decodeLogFileBlock into <string, string> pairs;
|
||||
// Step 2: Concatenate the second of pairs with the same pair.first.
|
||||
// pProcessedFileOffset: ensure each data block is processed in order exactly once;
|
||||
// pMutationMap: concatenated mutation list string at the mutation's commit version
|
||||
ACTOR static Future<Void> _parseLogFileToMutationsOnLoader(NotifiedVersion* pProcessedFileOffset,
|
||||
SerializedMutationListMap* pMutationMap,
|
||||
SerializedMutationPartMap* pMutationPartMap,
|
||||
|
@ -276,6 +276,7 @@ ACTOR static Future<Version> processRestoreRequest(Reference<RestoreMasterData>
|
||||
self->initBackupContainer(request.url);
|
||||
|
||||
// Get all backup files' description and save them to files
|
||||
// TODO for Jingyu: Verify all backup files in new backup are collected
|
||||
wait(collectBackupFiles(self->bc, &rangeFiles, &logFiles, cx, request));
|
||||
|
||||
std::sort(rangeFiles.begin(), rangeFiles.end());
|
||||
@ -284,6 +285,7 @@ ACTOR static Future<Version> processRestoreRequest(Reference<RestoreMasterData>
|
||||
std::tie(f2.endVersion, f2.beginVersion, f2.fileIndex, f2.fileName);
|
||||
});
|
||||
|
||||
// TODO for Jingyu: Verify new backup files are grouped into correct version batches.
|
||||
self->buildVersionBatches(rangeFiles, logFiles, &self->versionBatches); // Divide files into version batches
|
||||
self->dumpVersionBatches(self->versionBatches);
|
||||
|
||||
|
@ -51,6 +51,8 @@ struct RestoreMasterData;
|
||||
|
||||
struct RestoreSimpleRequest;
|
||||
|
||||
// VersionedMutationsMap: Key is the version of parsed backup mutations
|
||||
// Value MutationsVec is the vector of parsed backup mutations
|
||||
using VersionedMutationsMap = std::map<Version, MutationsVec>;
|
||||
|
||||
ACTOR Future<Void> isSchedulable(Reference<RestoreRoleData> self, int actorBatchIndex, std::string name);
|
||||
|
Loading…
x
Reference in New Issue
Block a user