diff options
author | Luke Chen <luke.chen@mongodb.com> | 2022-04-26 15:33:17 +1000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-04-26 05:56:27 +0000 |
commit | 1b70d1396650b8345b51c3a36f0cc77aa937d4a5 (patch) | |
tree | 7d453399d5be34a721527d7c9acf27924676a4a6 /src/third_party/wiredtiger/test/checkpoint | |
parent | 225f3122c7513a96435747a773ecc9992a791825 (diff) | |
download | mongo-1b70d1396650b8345b51c3a36f0cc77aa937d4a5.tar.gz |
Import wiredtiger: 5003f657b04bde3df73de6f655cbfbbc081cd252 from branch mongodb-6.0
ref: 7a7d6bf9ab..5003f657b0
for: 6.0.0-rc2
WT-9096 Fix search near returning wrong key/value sometimes when key doesn't exist
Diffstat (limited to 'src/third_party/wiredtiger/test/checkpoint')
-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 15110bb54de..5ffa8046f52 100644 --- a/src/third_party/wiredtiger/test/checkpoint/workers.c +++ b/src/third_party/wiredtiger/test/checkpoint/workers.c @@ -214,6 +214,16 @@ worker_op(WT_CURSOR *cursor, table_type type, 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) { /* Advance to the next key that exists. */ if ((ret = cursor->next(cursor)) != 0) { |