summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/src/conn
diff options
context:
space:
mode:
authorLuke Chen <luke.chen@mongodb.com>2018-04-10 18:25:30 +1000
committerLuke Chen <luke.chen@mongodb.com>2018-04-10 18:25:30 +1000
commit5ae38f156cb08fd5a66eb9e9327953e99442fc9c (patch)
treebdda4141d8e63aeab38fc8b615d521a8772546e8 /src/third_party/wiredtiger/src/conn
parent9be2c132cb4713e13bbaa5648077e5346a29c99b (diff)
downloadmongo-5ae38f156cb08fd5a66eb9e9327953e99442fc9c.tar.gz
Import wiredtiger: 5bfcc924079afdcd6dda22c29b5fa60a14ec3dc9 from branch mongodb-3.8
ref: ea986ede14..5bfcc92407 for: 3.7.4 WT-3886 Identify statistics relevant for prepared transactions WT-3910 Fix libwiredtiger-3.0.1.dylib loading failure on OS X WT-4006 Add support for stress timing configurations to test/format WT-4009 Create fast path for cursor caching with "overwrite=false" WT-4014 If eviction walk is interrupted, clean up the queue. WT-4015 Enhance schema06 unit test to test drops WT-4017 When evicting during a checkpoint, avoid splits WT-4028 Don't check for a modified page without holding the ref locked
Diffstat (limited to 'src/third_party/wiredtiger/src/conn')
-rw-r--r--src/third_party/wiredtiger/src/conn/conn_api.c24
1 files changed, 18 insertions, 6 deletions
diff --git a/src/third_party/wiredtiger/src/conn/conn_api.c b/src/third_party/wiredtiger/src/conn/conn_api.c
index 6f23508ba14..c67ec597f66 100644
--- a/src/third_party/wiredtiger/src/conn/conn_api.c
+++ b/src/third_party/wiredtiger/src/conn/conn_api.c
@@ -1987,16 +1987,29 @@ err: __wt_scr_free(session, &buf);
/*
* __wt_timing_stress_config --
- * Set timing stress for test delay configuration.
+ * Set timing stress configuration. There are a places we optionally make
+ * threads sleep in order to stress the system and increase the likelihood of
+ * failure. For example, there are several places where page splits are delayed
+ * to make cursor iteration races more likely.
*/
int
__wt_timing_stress_config(WT_SESSION_IMPL *session, const char *cfg[])
{
+ /*
+ * Each split race delay is controlled using a different flag to allow
+ * more effective race condition detection, since enabling all delays
+ * at once can lead to an overall slowdown to the point where race
+ * conditions aren't encountered.
+ */
static const WT_NAME_FLAG stress_types[] = {
{ "checkpoint_slow", WT_TIMING_STRESS_CHECKPOINT_SLOW },
- { "internal_page_split_race",
- WT_TIMING_STRESS_INTERNAL_PAGE_SPLIT_RACE },
- { "page_split_race", WT_TIMING_STRESS_PAGE_SPLIT_RACE },
+ { "split_race_1", WT_TIMING_STRESS_SPLIT_RACE_1 },
+ { "split_race_2", WT_TIMING_STRESS_SPLIT_RACE_2 },
+ { "split_race_3", WT_TIMING_STRESS_SPLIT_RACE_3 },
+ { "split_race_4", WT_TIMING_STRESS_SPLIT_RACE_4 },
+ { "split_race_5", WT_TIMING_STRESS_SPLIT_RACE_5 },
+ { "split_race_6", WT_TIMING_STRESS_SPLIT_RACE_6 },
+ { "split_race_7", WT_TIMING_STRESS_SPLIT_RACE_7 },
{ NULL, 0 }
};
WT_CONFIG_ITEM cval, sval;
@@ -2007,8 +2020,7 @@ __wt_timing_stress_config(WT_SESSION_IMPL *session, const char *cfg[])
conn = S2C(session);
- WT_RET(__wt_config_gets(
- session, cfg, "timing_stress_for_test", &cval));
+ WT_RET(__wt_config_gets(session, cfg, "timing_stress_for_test", &cval));
flags = 0;
for (ft = stress_types; ft->name != NULL; ft++) {