diff options
author | Luke Chen <luke.chen@mongodb.com> | 2022-06-20 13:20:39 +1000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-06-20 03:36:06 +0000 |
commit | b208df54e42f1045b3c5d6ac28143f73e82bec0a (patch) | |
tree | e4ca2c2dbdf79b72b5f564245738afa8d6f9fe9a /src/third_party/wiredtiger/test | |
parent | da7882d74e9947e64c1d918c03e27f3f5467a83a (diff) | |
download | mongo-b208df54e42f1045b3c5d6ac28143f73e82bec0a.tar.gz |
Import wiredtiger: 315f1424f9a8f97a4634b0cb001e2e7d0ed4b587 from branch mongodb-4.4
ref: c3bb82693f..315f1424f9
for: 4.4.16
WT-9096 Fix search near returning wrong key/value sometimes when key doesn't exist
Diffstat (limited to 'src/third_party/wiredtiger/test')
-rw-r--r-- | src/third_party/wiredtiger/test/checkpoint/workers.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/third_party/wiredtiger/test/checkpoint/workers.c b/src/third_party/wiredtiger/test/checkpoint/workers.c index 5ed22005fe5..2845658e106 100644 --- a/src/third_party/wiredtiger/test/checkpoint/workers.c +++ b/src/third_party/wiredtiger/test/checkpoint/workers.c @@ -195,6 +195,16 @@ worker_op(WT_CURSOR *cursor, uint64_t keyno, u_int new_val) return (WT_ROLLBACK); return (log_print_err("cursor.search_near", ret, 1)); } + + /* Retry the result of search_near again to confirm the result. */ + if (new_val % 2 == 0) { + if ((ret = cursor->search(cursor)) != 0) { + if (ret == WT_ROLLBACK) + return (WT_ROLLBACK); + return (log_print_err("cursor.search", ret, 1)); + } + } + if (cmp < 0) { if ((ret = cursor->next(cursor)) != 0) { if (ret == WT_NOTFOUND) |