diff options
author | Luke Chen <luke.chen@mongodb.com> | 2020-03-24 16:34:23 +1100 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-03-24 06:16:46 +0000 |
commit | b7d015ba4e8730ddcfcf7c5258b9ffa5cfb0949a (patch) | |
tree | ae407d81714508df63eba1a1d536bf4e547c01e2 /src/third_party/wiredtiger/test/format/backup.c | |
parent | 81c6113198d2f5debf3da38a42bf61d7a079de2e (diff) | |
download | mongo-b7d015ba4e8730ddcfcf7c5258b9ffa5cfb0949a.tar.gz |
Import wiredtiger: 4500a8ed93af91b15901d00a9f9c2587f94275f9 from branch mongodb-4.4
ref: f6ab94b43b..4500a8ed93
for: 4.4.0-rc0
WT-5616 Coverity: Memory leak
WT-5669 Prepare support with durable history: backport data format changes to 4.2
WT-5672 Prepare support with durable history: implement rollback_to_stable
WT-5674 Prepare support with durable history: add/debug functional tests
WT-5754 Ensure the value is globally visible before encode it into WT_ROW
WT-5813 Fix heap-use-after-free in __split_parent
WT-5855 Clean up operation tracking documentation
WT-5880 test/format backup missing expected log file
WT-5885 Improve WT rollback to stable verbose output for better debugging
WT-5887 Turn off verbose output when test/format output is redirected to a file
WT-5890 Bump log/WT version to facilitate upgrade/downgrade floor for MongoDB
WT-5894 Don't persist durable timestamp if it is same as commit timestamp
WT-5896 Recovery sometimes attempts rollback to stable with an absent history store file
WT-5898 Fix memory leak in verifying history store
WT-5899 Restore WT_PAGE_LAS_UPDATE on-disk page flag value to avoid break backward compatibility
WT-5900 Display failed version numbers in error message for version mismatch failures
WT-5910 Fix start_durable_ts when handling out-of-order updates
Diffstat (limited to 'src/third_party/wiredtiger/test/format/backup.c')
-rw-r--r-- | src/third_party/wiredtiger/test/format/backup.c | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/src/third_party/wiredtiger/test/format/backup.c b/src/third_party/wiredtiger/test/format/backup.c index 46b6e7b879c..f0123418888 100644 --- a/src/third_party/wiredtiger/test/format/backup.c +++ b/src/third_party/wiredtiger/test/format/backup.c @@ -327,8 +327,8 @@ backup(void *arg) WT_CURSOR *backup_cursor; WT_DECL_RET; WT_SESSION *session; - uint32_t src_id, src_prev; u_int incremental, period; + uint32_t src_id; const char *config, *key; char cfg[512]; bool full, incr_full; @@ -382,28 +382,11 @@ backup(void *arg) full = true; incr_full = false; } else { - /* - * 75% of the time, use the most recent source id. 25% of the time, use the id - * that is from two incremental backups prior. The handling of the active files for - * the source one or two incrementals prior is unpleasant but necessary. - */ - src_prev = mmrand(NULL, 1, 4) == 2 && g.backup_id >= 2 && full == false ? 2 : 1; - if (src_prev == 2) { - /* - * If we're going back two incrementals ago, set active_prev to the other list - * of active files (i.e. the active list that is not the immediate previous - * list) and overwrite active_prev with the current one. - */ - active_now = active_prev; - if (active_prev == &active[0]) - active_prev = &active[1]; - else - active_prev = &active[0]; - } else if (active_prev == &active[0]) + if (active_prev == &active[0]) active_now = &active[1]; else active_now = &active[0]; - src_id = g.backup_id - src_prev; + src_id = g.backup_id - 1; testutil_check(__wt_snprintf(cfg, sizeof(cfg), "incremental=(enabled,src_id=ID%u,this_id=ID%" PRIu32 ")", src_id, g.backup_id++)); @@ -476,7 +459,7 @@ backup(void *arg) * more incremental backups). */ if (full) - incremental = g.c_logging_archive ? 1 : mmrand(NULL, 1, 5); + incremental = g.c_logging_archive ? 1 : mmrand(NULL, 1, 8); if (--incremental == 0) { check_copy(); /* We ran recovery in the backup directory, so next time it must be a full backup. */ |