summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Chen <luke.chen@mongodb.com>2022-01-11 12:07:00 +1100
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-01-11 01:44:39 +0000
commit2db4a256c3481237ce52008fcf3eed4381a1d5d2 (patch)
treea7f6147eec25e9cadcfd67e4daf4bb533af361c4
parentbba366217412895a80288bb2dcdefcf45e34a2be (diff)
downloadmongo-2db4a256c3481237ce52008fcf3eed4381a1d5d2.tar.gz
Import wiredtiger: 06f6747bcb94bc81936dd97f763483464247ec97 from branch mongodb-5.2
ref: 562f6d57d3..06f6747bcb for: 5.2.0-rc5 WT-8611 Use system timing stress function for compact
-rw-r--r--src/third_party/wiredtiger/import.data2
-rw-r--r--src/third_party/wiredtiger/src/session/session_compact.c20
2 files changed, 2 insertions, 20 deletions
diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data
index ef5aa8d7438..0e4d5e7f947 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-5.2",
- "commit": "562f6d57d38b218c7a5c12e8ddee39a87df71b03"
+ "commit": "06f6747bcb94bc81936dd97f763483464247ec97"
}
diff --git a/src/third_party/wiredtiger/src/session/session_compact.c b/src/third_party/wiredtiger/src/session/session_compact.c
index 05851afd4c5..6c7d51f41b1 100644
--- a/src/third_party/wiredtiger/src/session/session_compact.c
+++ b/src/third_party/wiredtiger/src/session/session_compact.c
@@ -176,24 +176,6 @@ __compact_handle_append(WT_SESSION_IMPL *session, const char *cfg[])
}
/*
- * __compact_timing_stress --
- * Optionally add a delay to the compact for debug purposes.
- */
-static void
-__compact_timing_stress(WT_SESSION_IMPL *session)
-{
- struct timespec tsp;
-
- /* We only want to sleep if the flag is set. */
- if (FLD_ISSET(S2C(session)->timing_stress_flags, WT_TIMING_STRESS_COMPACT_SLOW)) {
- /* Add a 2 second wait to simulate compact slowness. */
- tsp.tv_sec = 2;
- tsp.tv_nsec = 0;
- __wt_sleep((uint64_t)tsp.tv_sec, (uint64_t)tsp.tv_nsec / WT_THOUSAND);
- }
-}
-
-/*
* __wt_session_compact_check_timeout --
* Check if the timeout has been exceeded.
*/
@@ -275,7 +257,7 @@ __compact_worker(WT_SESSION_IMPL *session)
if (session->op_handle[i]->compact_skip)
continue;
- __compact_timing_stress(session);
+ __wt_timing_stress(session, WT_TIMING_STRESS_COMPACT_SLOW);
session->compact_state = WT_COMPACT_RUNNING;
WT_WITH_DHANDLE(session, session->op_handle[i], ret = __wt_compact(session));