summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/test/checkpoint/workers.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/third_party/wiredtiger/test/checkpoint/workers.c')
-rw-r--r--src/third_party/wiredtiger/test/checkpoint/workers.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/src/third_party/wiredtiger/test/checkpoint/workers.c b/src/third_party/wiredtiger/test/checkpoint/workers.c
index ca1bca04528..33836c67110 100644
--- a/src/third_party/wiredtiger/test/checkpoint/workers.c
+++ b/src/third_party/wiredtiger/test/checkpoint/workers.c
@@ -126,13 +126,22 @@ worker_op(WT_CURSOR *cursor, uint64_t keyno, u_int new_val)
char valuebuf[64];
cursor->set_key(cursor, keyno);
- testutil_check(__wt_snprintf(
- valuebuf, sizeof(valuebuf), "%037u", new_val));
- cursor->set_value(cursor, valuebuf);
- if ((ret = cursor->insert(cursor)) != 0) {
- if (ret == WT_ROLLBACK)
- return (WT_ROLLBACK);
- return (log_print_err("cursor.insert", ret, 1));
+ /* Roughly 5% removes. */
+ if (new_val % 19 == 0) {
+ if ((ret = cursor->remove(cursor)) != 0) {
+ if (ret == WT_ROLLBACK)
+ return (WT_ROLLBACK);
+ return (log_print_err("cursor.remove", ret, 1));
+ }
+ } else {
+ testutil_check(__wt_snprintf(
+ valuebuf, sizeof(valuebuf), "%037u", new_val));
+ cursor->set_value(cursor, valuebuf);
+ if ((ret = cursor->insert(cursor)) != 0) {
+ if (ret == WT_ROLLBACK)
+ return (WT_ROLLBACK);
+ return (log_print_err("cursor.insert", ret, 1));
+ }
}
return (0);
}