summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Wlodarek <gregory.wlodarek@mongodb.com>2020-02-24 16:00:10 -0500
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-02-25 22:26:41 +0000
commitb4181a05a619ef07132891e4abbedf6903ff0d10 (patch)
tree135f0f525b5ed1732e0d96a50016896b2f20d76c
parentbcd8085cb84a03ccf819d547e323ab4701705bf6 (diff)
downloadmongo-b4181a05a619ef07132891e4abbedf6903ff0d10.tar.gz
SERVER-46375 Include the offset, length pair for files as part of the first full backup for incremental
(cherry picked from commit c553f6acd0ce7768d25a2dcdfa9358aa22b5ee55)
-rw-r--r--src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp
index d3b509fba3f..505ed8722d9 100644
--- a/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp
+++ b/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp
@@ -546,6 +546,11 @@ StatusWith<StorageEngine::BackupInformation> getBackupInformationFromBackupCurso
StorageEngine::BackupFile backupFile(fileSize);
backupInformation.insert({filePath.string(), backupFile});
+ // For the first full incremental backup, include the offset and length.
+ if (incrementalBackup && fullBackup) {
+ backupInformation.at(filePath.string()).blocksToCopy.push_back({0, fileSize});
+ }
+
// Full backups cannot open an incremental cursor, even if they are the first full backup
// for incremental.
if (!incrementalBackup || fullBackup) {