From 0938e45c6ab1bb7607c582745f26d190cf142b6c Mon Sep 17 00:00:00 2001 From: Jingyu Zhou Date: Thu, 16 Apr 2020 15:52:20 -0700 Subject: [PATCH] Set continuous version to invalidVersion when snapshot version is the target version --- fdbclient/BackupContainer.actor.cpp | 1 + fdbclient/BackupContainer.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/fdbclient/BackupContainer.actor.cpp b/fdbclient/BackupContainer.actor.cpp index 965042f627..1719d7837e 100644 --- a/fdbclient/BackupContainer.actor.cpp +++ b/fdbclient/BackupContainer.actor.cpp @@ -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(restorable); } diff --git a/fdbclient/BackupContainer.h b/fdbclient/BackupContainer.h index e68e29b014..7c6f96d38c 100644 --- a/fdbclient/BackupContainer.h +++ b/fdbclient/BackupContainer.h @@ -197,7 +197,8 @@ struct RestorableFileSet { // Range file's key ranges. Can be empty for backups generated before 6.3. std::map 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