From 3168343fc7ad220f86f908222f93332da4689872 Mon Sep 17 00:00:00 2001 From: Etienne Petrel Date: Tue, 21 Sep 2021 04:36:33 +0000 Subject: Import wiredtiger: f7722dec100b659418f00d8e338ce1fc35d489de from branch mongodb-master ref: 0a709818aa..f7722dec10 for: 5.1.0 WT-8125 Update hs_cleanup cppsuite test to use the new thread_context logic --- src/third_party/wiredtiger/import.data | 2 +- .../wiredtiger/test/cppsuite/configs/hs_cleanup_default.txt | 2 +- .../wiredtiger/test/cppsuite/tests/hs_cleanup.cxx | 13 ++++++------- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data index 33e37e711ba..7941c65a6ff 100644 --- a/src/third_party/wiredtiger/import.data +++ b/src/third_party/wiredtiger/import.data @@ -2,5 +2,5 @@ "vendor": "wiredtiger", "github": "wiredtiger/wiredtiger.git", "branch": "mongodb-master", - "commit": "0a709818aaeda3d9421c944a5df3d1df44f66c8b" + "commit": "f7722dec100b659418f00d8e338ce1fc35d489de" } diff --git a/src/third_party/wiredtiger/test/cppsuite/configs/hs_cleanup_default.txt b/src/third_party/wiredtiger/test/cppsuite/configs/hs_cleanup_default.txt index 5dc77f97645..f842cab4631 100644 --- a/src/third_party/wiredtiger/test/cppsuite/configs/hs_cleanup_default.txt +++ b/src/third_party/wiredtiger/test/cppsuite/configs/hs_cleanup_default.txt @@ -25,7 +25,7 @@ runtime_monitor= #10GB limit=10000000000 ), - postrun_statistics=[cache_hs_insert:0:100000000, cc_pages_removed:0:10000000], + postrun_statistics=[cache_hs_insert:10:100000000, cc_pages_removed:0:10000000], ), timestamp_manager= ( diff --git a/src/third_party/wiredtiger/test/cppsuite/tests/hs_cleanup.cxx b/src/third_party/wiredtiger/test/cppsuite/tests/hs_cleanup.cxx index 03de6947a86..5a828f865f5 100644 --- a/src/third_party/wiredtiger/test/cppsuite/tests/hs_cleanup.cxx +++ b/src/third_party/wiredtiger/test/cppsuite/tests/hs_cleanup.cxx @@ -91,14 +91,13 @@ class hs_cleanup : public test { * API doesn't guarantee our buffer will still be valid once it is called, as such we * copy the buffer and then pass it into the API. */ - bool rollback_required = tc->update(cursor, coll.id, key_value_t(key_tmp)); - - /* Commit our transaction. */ - if (!rollback_required && tc->transaction.can_commit()) - rollback_required = tc->transaction.commit(); - - if (rollback_required) + if (tc->update(cursor, coll.id, key_value_t(key_tmp))) { + if (tc->transaction.can_commit()) { + tc->transaction.commit(); + } + } else { tc->transaction.rollback(); + } } /* Ensure our last transaction is resolved. */ if (tc->transaction.active()) -- cgit v1.2.1