diff options
Diffstat (limited to 'src/third_party/wiredtiger/test/checkpoint/checkpointer.c')
-rw-r--r-- | src/third_party/wiredtiger/test/checkpoint/checkpointer.c | 12 |
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. */ |