summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/test/format
diff options
context:
space:
mode:
authorLuke Chen <luke.chen@mongodb.com>2021-09-13 09:56:46 +1000
committerLuke Chen <luke.chen@mongodb.com>2021-09-13 09:56:46 +1000
commit71f9ea50b97cf49ffc52ed33a8c798a77990ba80 (patch)
treea7c45c0300164319d2a6ecda11c7fde508713a5b /src/third_party/wiredtiger/test/format
parent057ee3d434a3822bc007d7a34524b4eb0a1aa1ea (diff)
downloadmongo-71f9ea50b97cf49ffc52ed33a8c798a77990ba80.tar.gz
Import wiredtiger: 7f9d2bd3eefbb725301d6075db7ce48c3b33e159 from branch mongodb-4.4
ref: 823abc9cb3..7f9d2bd3ee for: 4.4.9 WT-7630 Fix a history store entry remove with checkpoint reserved transaction-id WT-7958 Include recovery in test/checkpoint WT-8032 Add fail points in reconciliation for history store inserts. WT-8047 Add mixed mode delete operations to test checkpoint WT-8056 Fix a bug in RTS that incorrectly restores an update from HS lead to the key removal
Diffstat (limited to 'src/third_party/wiredtiger/test/format')
-rw-r--r--src/third_party/wiredtiger/test/format/config.c8
-rw-r--r--src/third_party/wiredtiger/test/format/config.h16
-rw-r--r--src/third_party/wiredtiger/test/format/format.h4
-rw-r--r--src/third_party/wiredtiger/test/format/wts.c49
4 files changed, 77 insertions, 0 deletions
diff --git a/src/third_party/wiredtiger/test/format/config.c b/src/third_party/wiredtiger/test/format/config.c
index 33b8d7a9112..e3c1afea11a 100644
--- a/src/third_party/wiredtiger/test/format/config.c
+++ b/src/third_party/wiredtiger/test/format/config.c
@@ -384,6 +384,14 @@ config_backward_compatible(void)
config_single("disk.mmap_all=off", false);
}
+ if (g.c_timing_stress_checkpoint_reserved_txnid_delay) {
+ if (config_is_perm("stress.checkpoint_reserved_txnid_delay"))
+ testutil_die(EINVAL,
+ "stress.checkpoint_reserved_txnid_delay not supported in backward compatibility "
+ "mode");
+ config_single("stress.checkpoint_reserved_txnid_delay=off", false);
+ }
+
if (g.c_timing_stress_hs_sweep) {
if (config_is_perm("stress.hs_sweep"))
testutil_die(EINVAL, "stress.hs_sweep not supported in backward compatibility mode");
diff --git a/src/third_party/wiredtiger/test/format/config.h b/src/third_party/wiredtiger/test/format/config.h
index 07a6e2603ff..c5456810e60 100644
--- a/src/third_party/wiredtiger/test/format/config.h
+++ b/src/third_party/wiredtiger/test/format/config.h
@@ -301,9 +301,25 @@ static CONFIG c[] = {
{"stress.checkpoint", "stress checkpoints", C_BOOL, 2, 0, 0, &g.c_timing_stress_checkpoint, NULL},
/* 2% */
+ {"stress.checkpoint_reserved_txnid_delay", "stress checkpoint invisible transaction id delay",
+ C_BOOL, 2, 0, 0, &g.c_timing_stress_checkpoint_reserved_txnid_delay, NULL},
+
+ /* 2% */
{"stress.checkpoint_prepare", "stress checkpoint prepare", C_BOOL, 2, 0, 0,
&g.c_timing_stress_checkpoint_prepare, NULL},
+ /* 30% */
+ {"stress.failpoint_hs_delete_key_from_ts", "stress failpoint history store delete key from ts",
+ C_BOOL, 30, 0, 0, &g.c_timing_stress_failpoint_hs_delete_key_from_ts, NULL},
+
+ /* 30% */
+ {"stress.failpoint_hs_insert_1", "stress failpoint history store insert (#1)", C_BOOL, 30, 0, 0,
+ &g.c_timing_stress_failpoint_hs_insert_1, NULL},
+
+ /* 30% */
+ {"stress.failpoint_hs_insert_2", "stress failpoint history store insert (#2)", C_BOOL, 30, 0, 0,
+ &g.c_timing_stress_failpoint_hs_insert_2, NULL},
+
/* 2% */
{"stress.hs_checkpoint_delay", "stress history store checkpoint delay", C_BOOL, 2, 0, 0,
&g.c_timing_stress_hs_checkpoint_delay, NULL},
diff --git a/src/third_party/wiredtiger/test/format/format.h b/src/third_party/wiredtiger/test/format/format.h
index 619060e1881..ecfb83a37ce 100644
--- a/src/third_party/wiredtiger/test/format/format.h
+++ b/src/third_party/wiredtiger/test/format/format.h
@@ -249,6 +249,10 @@ typedef struct {
uint32_t c_timer;
uint32_t c_timing_stress_aggressive_sweep;
uint32_t c_timing_stress_checkpoint;
+ uint32_t c_timing_stress_checkpoint_reserved_txnid_delay;
+ uint32_t c_timing_stress_failpoint_hs_delete_key_from_ts;
+ uint32_t c_timing_stress_failpoint_hs_insert_1;
+ uint32_t c_timing_stress_failpoint_hs_insert_2;
uint32_t c_timing_stress_hs_checkpoint_delay;
uint32_t c_timing_stress_hs_search;
uint32_t c_timing_stress_hs_sweep;
diff --git a/src/third_party/wiredtiger/test/format/wts.c b/src/third_party/wiredtiger/test/format/wts.c
index e27f54a42a9..d9f0c81a34c 100644
--- a/src/third_party/wiredtiger/test/format/wts.c
+++ b/src/third_party/wiredtiger/test/format/wts.c
@@ -264,6 +264,14 @@ create_database(const char *home, WT_CONNECTION **connp)
CONFIG_APPEND(p, ",checkpoint_slow");
if (g.c_timing_stress_checkpoint_prepare)
CONFIG_APPEND(p, ",prepare_checkpoint_delay");
+ if (g.c_timing_stress_checkpoint_reserved_txnid_delay)
+ CONFIG_APPEND(p, ",checkpoint_reserved_txnid_delay");
+ if (g.c_timing_stress_failpoint_hs_delete_key_from_ts)
+ CONFIG_APPEND(p, ",failpoint_history_store_delete_key_from_ts");
+ if (g.c_timing_stress_failpoint_hs_insert_1)
+ CONFIG_APPEND(p, ",failpoint_history_store_insert_1");
+ if (g.c_timing_stress_failpoint_hs_insert_2)
+ CONFIG_APPEND(p, ",failpoint_history_store_insert_2");
if (g.c_timing_stress_hs_checkpoint_delay)
CONFIG_APPEND(p, ",history_store_checkpoint_delay");
if (g.c_timing_stress_hs_search)
@@ -478,6 +486,47 @@ wts_open(const char *home, WT_CONNECTION **connp, WT_SESSION **sessionp, bool al
if (enc != NULL)
CONFIG_APPEND(p, ",encryption=(name=%s)", enc);
+ /*
+ * Timing stress options aren't persisted in the base config and need to be added to the
+ * configuration for re-open.
+ */
+ CONFIG_APPEND(p, ",timing_stress_for_test=[");
+ if (g.c_timing_stress_aggressive_sweep)
+ CONFIG_APPEND(p, ",aggressive_sweep");
+ if (g.c_timing_stress_checkpoint)
+ CONFIG_APPEND(p, ",checkpoint_slow");
+ if (g.c_timing_stress_checkpoint_prepare)
+ CONFIG_APPEND(p, ",prepare_checkpoint_delay");
+ if (g.c_timing_stress_failpoint_hs_delete_key_from_ts)
+ CONFIG_APPEND(p, ",failpoint_history_store_delete_key_from_ts");
+ if (g.c_timing_stress_failpoint_hs_insert_1)
+ CONFIG_APPEND(p, ",failpoint_history_store_insert_1");
+ if (g.c_timing_stress_failpoint_hs_insert_2)
+ CONFIG_APPEND(p, ",failpoint_history_store_insert_2");
+ if (g.c_timing_stress_hs_checkpoint_delay)
+ CONFIG_APPEND(p, ",history_store_checkpoint_delay");
+ if (g.c_timing_stress_hs_search)
+ CONFIG_APPEND(p, ",history_store_search");
+ if (g.c_timing_stress_hs_sweep)
+ CONFIG_APPEND(p, ",history_store_sweep_race");
+ if (g.c_timing_stress_split_1)
+ CONFIG_APPEND(p, ",split_1");
+ if (g.c_timing_stress_split_2)
+ CONFIG_APPEND(p, ",split_2");
+ if (g.c_timing_stress_split_3)
+ CONFIG_APPEND(p, ",split_3");
+ if (g.c_timing_stress_split_4)
+ CONFIG_APPEND(p, ",split_4");
+ if (g.c_timing_stress_split_5)
+ CONFIG_APPEND(p, ",split_5");
+ if (g.c_timing_stress_split_6)
+ CONFIG_APPEND(p, ",split_6");
+ if (g.c_timing_stress_split_7)
+ CONFIG_APPEND(p, ",split_7");
+ if (g.c_timing_stress_split_8)
+ CONFIG_APPEND(p, ",split_8");
+ CONFIG_APPEND(p, "]");
+
/* If in-memory, there's only a single, shared WT_CONNECTION handle. */
if (g.c_in_memory != 0)
conn = g.wts_conn_inmemory;