summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/test/checkpoint/checkpointer.c
diff options
context:
space:
mode:
authorLuke Chen <luke.chen@mongodb.com>2022-04-20 11:39:06 +1000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-04-20 02:06:10 +0000
commitc87e1c23421bf79614baf500fda6622bd90f674e (patch)
treee992f5991cade9e169baa5db6d1676509961790c /src/third_party/wiredtiger/test/checkpoint/checkpointer.c
parent221a44efc37f2f88812275b153e6c8b823310880 (diff)
Import wiredtiger: 59935f25151762defb0f0b645ce69d7e16ef1b65 from branch mongodb-5.0r5.0.8-rc0r5.0.8
ref: 3b6a65170a..59935f2515 for: 5.0.8 WT-7662 Format timed out with prepare-conflict WT-8260 Create a Python suite test to validate new EVENT_HANDLER JSON format WT-8708 Fix timestamp usage error in test/checkpoint WT-8924 Don't check against on disk time window if there is an insert list when checking for conflicts in row-store
Diffstat (limited to 'src/third_party/wiredtiger/test/checkpoint/checkpointer.c')
-rw-r--r--src/third_party/wiredtiger/test/checkpoint/checkpointer.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/third_party/wiredtiger/test/checkpoint/checkpointer.c b/src/third_party/wiredtiger/test/checkpoint/checkpointer.c
index 1c8b5135d49..a07604a6520 100644
--- a/src/third_party/wiredtiger/test/checkpoint/checkpointer.c
+++ b/src/third_party/wiredtiger/test/checkpoint/checkpointer.c
@@ -44,10 +44,10 @@ set_stable(void)
char buf[128];
if (g.race_timetamps)
- testutil_check(__wt_snprintf(
- buf, sizeof(buf), "stable_timestamp=%x,oldest_timestamp=%x", g.ts_stable, g.ts_stable));
+ testutil_check(__wt_snprintf(buf, sizeof(buf),
+ "stable_timestamp=%" PRIx64 ",oldest_timestamp=%" PRIx64, g.ts_stable, g.ts_stable));
else
- testutil_check(__wt_snprintf(buf, sizeof(buf), "stable_timestamp=%x", g.ts_stable));
+ testutil_check(__wt_snprintf(buf, sizeof(buf), "stable_timestamp=%" PRIx64, g.ts_stable));
testutil_check(g.conn->set_timestamp(g.conn, buf));
}
@@ -202,7 +202,9 @@ real_checkpointer(void)
verify_ts = stable_ts;
else
verify_ts = __wt_random(&rnd) % (stable_ts - oldest_ts + 1) + oldest_ts;
- WT_ORDERED_READ(g.ts_oldest, g.ts_stable);
+ __wt_writelock((WT_SESSION_IMPL *)session, &g.clock_lock);
+ g.ts_oldest = g.ts_stable;
+ __wt_writeunlock((WT_SESSION_IMPL *)session, &g.clock_lock);
}
/* Execute a checkpoint */
@@ -225,7 +227,7 @@ real_checkpointer(void)
/* Advance the oldest timestamp to the most recently set stable timestamp. */
if (g.use_timestamps && g.ts_oldest != 0) {
testutil_check(__wt_snprintf(
- timestamp_buf, sizeof(timestamp_buf), "oldest_timestamp=%x", g.ts_oldest));
+ timestamp_buf, sizeof(timestamp_buf), "oldest_timestamp=%" PRIx64, g.ts_oldest));
testutil_check(g.conn->set_timestamp(g.conn, timestamp_buf));
}
/* Random value between 4 and 8 seconds. */