summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/test/csuite/incr_backup
diff options
context:
space:
mode:
authorLuke Chen <luke.chen@mongodb.com>2020-06-05 17:04:46 +1000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-06-05 07:32:54 +0000
commit5c6e1e540a9b5b0e0c87fa3522b9e668e2357a8c (patch)
treee8974b8332a62cfab8b684d02453b8eaef4c4c27 /src/third_party/wiredtiger/test/csuite/incr_backup
parent4042389f588d64e9537253d7879450f3db5efcb1 (diff)
downloadmongo-5c6e1e540a9b5b0e0c87fa3522b9e668e2357a8c.tar.gz
Import wiredtiger: 4eb9f719eed3e24a9e49a6fa60d8d56eadb8b189 from branch mongodb-4.4
ref: d198ee319d..4eb9f719ee for: 4.5.1 WT-5801 Reduce runtime of Python unit tests by pruning test_compat02.py WT-6276 Add size first to cache and btree to avoid the race that can cause cache size underflow WT-6342 Fix external symbolizer path for PPC Evergreen tasks WT-6366 Off-by-one overflow in block-modification bitmaps for incremental backup WT-6373 Don't reset transaction ids when evicting mixed mode transactions WT-6376 Minor cleanups in resolving prepared operations WT-6378 Fix compile failure on OS X 10.12
Diffstat (limited to 'src/third_party/wiredtiger/test/csuite/incr_backup')
-rw-r--r--src/third_party/wiredtiger/test/csuite/incr_backup/main.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/third_party/wiredtiger/test/csuite/incr_backup/main.c b/src/third_party/wiredtiger/test/csuite/incr_backup/main.c
index 68a4e4b26d1..fee64ff683a 100644
--- a/src/third_party/wiredtiger/test/csuite/incr_backup/main.c
+++ b/src/third_party/wiredtiger/test/csuite/incr_backup/main.c
@@ -479,6 +479,7 @@ base_backup(WT_CONNECTION *conn, WT_RAND_STATE *rand, const char *home, const ch
int nfiles, ret;
char buf[4096];
char *filename;
+ char granularity_unit;
nfiles = 0;
@@ -493,14 +494,18 @@ base_backup(WT_CONNECTION *conn, WT_RAND_STATE *rand, const char *home, const ch
testutil_check(conn->open_session(conn, NULL, NULL, &session));
tinfo->full_backup_number = tinfo->incr_backup_number++;
- /* Half of the runs with a low granularity: 1M */
- if (__wt_random(rand) % 2 == 0)
- granularity = 1;
- else
- granularity = 1 + __wt_random(rand) % 20;
+ /* Half of the runs with very low granularity to stress bitmaps */
+ granularity = __wt_random(rand) % 20;
+ if (__wt_random(rand) % 2 == 0) {
+ granularity_unit = 'K';
+ granularity += 4;
+ } else {
+ granularity_unit = 'M';
+ granularity += 1;
+ }
testutil_check(__wt_snprintf(buf, sizeof(buf),
- "incremental=(granularity=%" PRIu32 "M,enabled=true,this_id=ID%d)", granularity,
- (int)tinfo->full_backup_number));
+ "incremental=(granularity=%" PRIu32 "%c,enabled=true,this_id=ID%d)", granularity,
+ granularity_unit, (int)tinfo->full_backup_number));
VERBOSE(3, "open_cursor(session, \"backup:\", NULL, \"%s\", &cursor)\n", buf);
testutil_check(session->open_cursor(session, "backup:", NULL, buf, &cursor));