Set continuous version to invalidVersion when snapshot version is the target version

This commit is contained in:
Jingyu Zhou 2020-04-16 15:52:20 -07:00
parent 930b175c4c
commit 0938e45c6a
2 changed files with 3 additions and 1 deletions

View File

@ -1353,6 +1353,7 @@ public:
// No logs needed if there is a complete key space snapshot at the target version.
if (snapshot.get().beginVersion == snapshot.get().endVersion &&
snapshot.get().endVersion == targetVersion) {
restorable.continuousBeginVersion = restorable.continuousEndVersion = invalidVersion;
return Optional<RestorableFileSet>(restorable);
}

View File

@ -197,7 +197,8 @@ struct RestorableFileSet {
// Range file's key ranges. Can be empty for backups generated before 6.3.
std::map<std::string, KeyRange> keyRanges;
// Mutation logs continuous range [begin, end)
// Mutation logs continuous range [begin, end). Both can be invalidVersion
// when the entire key space snapshot is at the target version.
Version continuousBeginVersion, continuousEndVersion;
KeyspaceSnapshotFile snapshot; // Info. for debug purposes