diff options
author | Alexey Anisimov <alexey.anisimov@mongodb.com> | 2022-02-04 16:37:44 +1100 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-02-04 06:05:41 +0000 |
commit | 2a871685d0c4883c254ad5f1dccc91e8879de92b (patch) | |
tree | 871138cc5333a1fe3d9686b940326f1cd7c425f9 | |
parent | 7eb93258d074ee3bac55e0a79902972f1cb4c89d (diff) | |
download | mongo-2a871685d0c4883c254ad5f1dccc91e8879de92b.tar.gz |
Import wiredtiger: 26d6fbf95e3dcbaa6d61069fb3f2c44615ae5c5b from branch mongodb-master
ref: 4e90eef9aa..26d6fbf95e
for: 5.3.0
WT-8701 Fix test_backup07.py to test the creation of new tables when backup cursor is open
-rw-r--r-- | src/third_party/wiredtiger/import.data | 2 | ||||
-rw-r--r-- | src/third_party/wiredtiger/test/suite/test_backup07.py | 14 |
2 files changed, 12 insertions, 4 deletions
diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data index d698b891cd7..6fc8a8ceaba 100644 --- a/src/third_party/wiredtiger/import.data +++ b/src/third_party/wiredtiger/import.data @@ -2,5 +2,5 @@ "vendor": "wiredtiger", "github": "wiredtiger/wiredtiger.git", "branch": "mongodb-master", - "commit": "4e90eef9aa6cab548252d137b5fd899293cba11b" + "commit": "26d6fbf95e3dcbaa6d61069fb3f2c44615ae5c5b" } diff --git a/src/third_party/wiredtiger/test/suite/test_backup07.py b/src/third_party/wiredtiger/test/suite/test_backup07.py index e1a26386480..b5317435eac 100644 --- a/src/third_party/wiredtiger/test/suite/test_backup07.py +++ b/src/third_party/wiredtiger/test/suite/test_backup07.py @@ -65,10 +65,12 @@ class test_backup07(backup_base): # We allow creates during backup because the file doesn't exist # when the backup metadata is created on cursor open and the newly # created file is not in the cursor list. - - # Create and add data to a new table and then copy the files with a full backup. os.mkdir(self.dir) + # Open up the backup cursor, create and add data to a new table + # and then copy the files. + bkup_c = self.session.open_cursor('backup:', None, None) + # Now create and populate the new table. Make sure the log records # are on disk and will be copied to the backup. self.session.create(self.newuri, "key_format=S,value_format=S") @@ -77,7 +79,13 @@ class test_backup07(backup_base): # Now copy the files using full backup. This should not include the newly # created table. - self.take_full_backup(self.dir) + all_files = self.take_full_backup(self.dir, bkup_c) + orig_logs = [file for file in all_files if "WiredTigerLog" in file] + self.assertFalse(self.newuri in all_files) + + # Now open a duplicate backup cursor and copy all the logs into the backup directory. + dup_logs = self.take_log_backup(bkup_c, self.dir, orig_logs) + bkup_c.close() # After the full backup, open and recover the backup database. # Make sure we properly recover even though the log file will have |