summaryrefslogtreecommitdiff
path: root/src/third_party
diff options
context:
space:
mode:
authorLuke Chen <luke.chen@mongodb.com>2020-08-10 16:49:25 +1000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-08-10 07:05:13 +0000
commitbefc561c8c06e2666dfcfd3b6bcadd5ef43bab88 (patch)
tree9ae8e832506d14b1e871b798783c37b0ad09e489 /src/third_party
parent2f4aecb91daae89c7f8eabe24ba1682ff1088186 (diff)
downloadmongo-befc561c8c06e2666dfcfd3b6bcadd5ef43bab88.tar.gz
Import wiredtiger: 4bcef79f181a296da9a46fb6728203eb3fb5ede1 from branch mongodb-4.6
ref: d29619b755..4bcef79f18 for: 4.5.1 WT-6322 Split full compatibility tests into smaller groups WT-6404 Add timing stress that delays checkpoint after it calls __wt_txn_begin
Diffstat (limited to 'src/third_party')
-rw-r--r--src/third_party/wiredtiger/dist/api_data.py4
-rw-r--r--src/third_party/wiredtiger/dist/s_string.ok2
-rw-r--r--src/third_party/wiredtiger/import.data2
-rw-r--r--src/third_party/wiredtiger/src/config/config_def.c20
-rw-r--r--src/third_party/wiredtiger/src/conn/conn_api.c1
-rw-r--r--src/third_party/wiredtiger/src/include/connection.h25
-rw-r--r--src/third_party/wiredtiger/src/txn/txn_ckpt.c30
-rw-r--r--src/third_party/wiredtiger/test/csuite/timestamp_abort/main.c28
-rwxr-xr-xsrc/third_party/wiredtiger/test/csuite/timestamp_abort/smoke.sh23
-rwxr-xr-xsrc/third_party/wiredtiger/test/evergreen.yml60
-rwxr-xr-xsrc/third_party/wiredtiger/test/evergreen/compatibility_test_for_releases.sh165
-rw-r--r--src/third_party/wiredtiger/test/format/config.h4
-rw-r--r--src/third_party/wiredtiger/test/format/format.h1
-rw-r--r--src/third_party/wiredtiger/test/format/wts.c2
14 files changed, 247 insertions, 120 deletions
diff --git a/src/third_party/wiredtiger/dist/api_data.py b/src/third_party/wiredtiger/dist/api_data.py
index 2286b64857c..faf364196e4 100644
--- a/src/third_party/wiredtiger/dist/api_data.py
+++ b/src/third_party/wiredtiger/dist/api_data.py
@@ -723,8 +723,8 @@ connection_runtime_config = [
type='list', undoc=True,
choices=[
'aggressive_sweep', 'checkpoint_slow', 'history_store_checkpoint_delay',
- 'history_store_sweep_race', 'split_1', 'split_2', 'split_3', 'split_4', 'split_5',
- 'split_6', 'split_7', 'split_8']),
+ 'history_store_sweep_race', 'prepare_checkpoint_delay', 'split_1', 'split_2',
+ 'split_3', 'split_4', 'split_5', 'split_6', 'split_7', 'split_8']),
Config('verbose', '', r'''
enable messages for various events. Options are given as a
list, such as <code>"verbose=[evictserver,read]"</code>''',
diff --git a/src/third_party/wiredtiger/dist/s_string.ok b/src/third_party/wiredtiger/dist/s_string.ok
index 689aa30c192..b6c24afcac1 100644
--- a/src/third_party/wiredtiger/dist/s_string.ok
+++ b/src/third_party/wiredtiger/dist/s_string.ok
@@ -233,7 +233,7 @@ LeafGreen
LevelDB
Levyx
LmRrSVv
-LmT
+LmsT
LoadLoad
LockFile
Lookaside
diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data
index 6aa1b8e5533..0a81e112d24 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-4.6",
- "commit": "d29619b755d79cb4406349e1309935b8c2fda2c2"
+ "commit": "4bcef79f181a296da9a46fb6728203eb3fb5ede1"
}
diff --git a/src/third_party/wiredtiger/src/config/config_def.c b/src/third_party/wiredtiger/src/config/config_def.c
index 62ec99ac07a..0887e393bd8 100644
--- a/src/third_party/wiredtiger/src/config/config_def.c
+++ b/src/third_party/wiredtiger/src/config/config_def.c
@@ -138,8 +138,8 @@ static const WT_CONFIG_CHECK confchk_WT_CONNECTION_reconfigure[] = {
{"timing_stress_for_test", "list", NULL,
"choices=[\"aggressive_sweep\",\"checkpoint_slow\","
"\"history_store_checkpoint_delay\",\"history_store_sweep_race\","
- "\"split_1\",\"split_2\",\"split_3\",\"split_4\",\"split_5\","
- "\"split_6\",\"split_7\",\"split_8\"]",
+ "\"prepare_checkpoint_delay\",\"split_1\",\"split_2\",\"split_3\""
+ ",\"split_4\",\"split_5\",\"split_6\",\"split_7\",\"split_8\"]",
NULL, 0},
{"verbose", "list", NULL,
"choices=[\"api\",\"backup\",\"block\",\"checkpoint\","
@@ -582,8 +582,8 @@ static const WT_CONFIG_CHECK confchk_wiredtiger_open[] = {
{"timing_stress_for_test", "list", NULL,
"choices=[\"aggressive_sweep\",\"checkpoint_slow\","
"\"history_store_checkpoint_delay\",\"history_store_sweep_race\","
- "\"split_1\",\"split_2\",\"split_3\",\"split_4\",\"split_5\","
- "\"split_6\",\"split_7\",\"split_8\"]",
+ "\"prepare_checkpoint_delay\",\"split_1\",\"split_2\",\"split_3\""
+ ",\"split_4\",\"split_5\",\"split_6\",\"split_7\",\"split_8\"]",
NULL, 0},
{"transaction_sync", "category", NULL, NULL, confchk_wiredtiger_open_transaction_sync_subconfigs,
2},
@@ -658,8 +658,8 @@ static const WT_CONFIG_CHECK confchk_wiredtiger_open_all[] = {
{"timing_stress_for_test", "list", NULL,
"choices=[\"aggressive_sweep\",\"checkpoint_slow\","
"\"history_store_checkpoint_delay\",\"history_store_sweep_race\","
- "\"split_1\",\"split_2\",\"split_3\",\"split_4\",\"split_5\","
- "\"split_6\",\"split_7\",\"split_8\"]",
+ "\"prepare_checkpoint_delay\",\"split_1\",\"split_2\",\"split_3\""
+ ",\"split_4\",\"split_5\",\"split_6\",\"split_7\",\"split_8\"]",
NULL, 0},
{"transaction_sync", "category", NULL, NULL, confchk_wiredtiger_open_transaction_sync_subconfigs,
2},
@@ -731,8 +731,8 @@ static const WT_CONFIG_CHECK confchk_wiredtiger_open_basecfg[] = {
{"timing_stress_for_test", "list", NULL,
"choices=[\"aggressive_sweep\",\"checkpoint_slow\","
"\"history_store_checkpoint_delay\",\"history_store_sweep_race\","
- "\"split_1\",\"split_2\",\"split_3\",\"split_4\",\"split_5\","
- "\"split_6\",\"split_7\",\"split_8\"]",
+ "\"prepare_checkpoint_delay\",\"split_1\",\"split_2\",\"split_3\""
+ ",\"split_4\",\"split_5\",\"split_6\",\"split_7\",\"split_8\"]",
NULL, 0},
{"transaction_sync", "category", NULL, NULL, confchk_wiredtiger_open_transaction_sync_subconfigs,
2},
@@ -802,8 +802,8 @@ static const WT_CONFIG_CHECK confchk_wiredtiger_open_usercfg[] = {
{"timing_stress_for_test", "list", NULL,
"choices=[\"aggressive_sweep\",\"checkpoint_slow\","
"\"history_store_checkpoint_delay\",\"history_store_sweep_race\","
- "\"split_1\",\"split_2\",\"split_3\",\"split_4\",\"split_5\","
- "\"split_6\",\"split_7\",\"split_8\"]",
+ "\"prepare_checkpoint_delay\",\"split_1\",\"split_2\",\"split_3\""
+ ",\"split_4\",\"split_5\",\"split_6\",\"split_7\",\"split_8\"]",
NULL, 0},
{"transaction_sync", "category", NULL, NULL, confchk_wiredtiger_open_transaction_sync_subconfigs,
2},
diff --git a/src/third_party/wiredtiger/src/conn/conn_api.c b/src/third_party/wiredtiger/src/conn/conn_api.c
index 59f0a3bc27d..b145a85e99b 100644
--- a/src/third_party/wiredtiger/src/conn/conn_api.c
+++ b/src/third_party/wiredtiger/src/conn/conn_api.c
@@ -2001,6 +2001,7 @@ __wt_timing_stress_config(WT_SESSION_IMPL *session, const char *cfg[])
{"checkpoint_slow", WT_TIMING_STRESS_CHECKPOINT_SLOW},
{"history_store_checkpoint_delay", WT_TIMING_STRESS_HS_CHECKPOINT_DELAY},
{"history_store_sweep_race", WT_TIMING_STRESS_HS_SWEEP},
+ {"prepare_checkpoint_delay", WT_TIMING_STRESS_PREPARE_CHECKPOINT_DELAY},
{"split_1", WT_TIMING_STRESS_SPLIT_1}, {"split_2", WT_TIMING_STRESS_SPLIT_2},
{"split_3", WT_TIMING_STRESS_SPLIT_3}, {"split_4", WT_TIMING_STRESS_SPLIT_4},
{"split_5", WT_TIMING_STRESS_SPLIT_5}, {"split_6", WT_TIMING_STRESS_SPLIT_6},
diff --git a/src/third_party/wiredtiger/src/include/connection.h b/src/third_party/wiredtiger/src/include/connection.h
index 9dce40a60eb..225d15a1ed9 100644
--- a/src/third_party/wiredtiger/src/include/connection.h
+++ b/src/third_party/wiredtiger/src/include/connection.h
@@ -503,18 +503,19 @@ struct __wt_connection_impl {
* Variable with flags for which subsystems the diagnostic stress timing delays have been requested.
*/
/* AUTOMATIC FLAG VALUE GENERATION START */
-#define WT_TIMING_STRESS_AGGRESSIVE_SWEEP 0x001u
-#define WT_TIMING_STRESS_CHECKPOINT_SLOW 0x002u
-#define WT_TIMING_STRESS_HS_CHECKPOINT_DELAY 0x004u
-#define WT_TIMING_STRESS_HS_SWEEP 0x008u
-#define WT_TIMING_STRESS_SPLIT_1 0x010u
-#define WT_TIMING_STRESS_SPLIT_2 0x020u
-#define WT_TIMING_STRESS_SPLIT_3 0x040u
-#define WT_TIMING_STRESS_SPLIT_4 0x080u
-#define WT_TIMING_STRESS_SPLIT_5 0x100u
-#define WT_TIMING_STRESS_SPLIT_6 0x200u
-#define WT_TIMING_STRESS_SPLIT_7 0x400u
-#define WT_TIMING_STRESS_SPLIT_8 0x800u
+#define WT_TIMING_STRESS_AGGRESSIVE_SWEEP 0x0001u
+#define WT_TIMING_STRESS_CHECKPOINT_SLOW 0x0002u
+#define WT_TIMING_STRESS_HS_CHECKPOINT_DELAY 0x0004u
+#define WT_TIMING_STRESS_HS_SWEEP 0x0008u
+#define WT_TIMING_STRESS_PREPARE_CHECKPOINT_DELAY 0x0010u
+#define WT_TIMING_STRESS_SPLIT_1 0x0020u
+#define WT_TIMING_STRESS_SPLIT_2 0x0040u
+#define WT_TIMING_STRESS_SPLIT_3 0x0080u
+#define WT_TIMING_STRESS_SPLIT_4 0x0100u
+#define WT_TIMING_STRESS_SPLIT_5 0x0200u
+#define WT_TIMING_STRESS_SPLIT_6 0x0400u
+#define WT_TIMING_STRESS_SPLIT_7 0x0800u
+#define WT_TIMING_STRESS_SPLIT_8 0x1000u
/* AUTOMATIC FLAG VALUE GENERATION STOP */
uint64_t timing_stress_flags;
diff --git a/src/third_party/wiredtiger/src/txn/txn_ckpt.c b/src/third_party/wiredtiger/src/txn/txn_ckpt.c
index 9b3d1bb51fb..655d9aa1557 100644
--- a/src/third_party/wiredtiger/src/txn/txn_ckpt.c
+++ b/src/third_party/wiredtiger/src/txn/txn_ckpt.c
@@ -8,7 +8,7 @@
#include "wt_internal.h"
-static void __checkpoint_timing_stress(WT_SESSION_IMPL *, bool);
+static void __checkpoint_timing_stress(WT_SESSION_IMPL *, uint64_t, struct timespec *);
static int __checkpoint_lock_dirty_tree(WT_SESSION_IMPL *, bool, bool, bool, const char *[]);
static int __checkpoint_mark_skip(WT_SESSION_IMPL *, WT_CKPT *, bool);
static int __checkpoint_presync(WT_SESSION_IMPL *, const char *[]);
@@ -517,6 +517,7 @@ __checkpoint_fail_reset(WT_SESSION_IMPL *session)
static int
__checkpoint_prepare(WT_SESSION_IMPL *session, bool *trackingp, const char *cfg[])
{
+ struct timespec tsp;
WT_CONFIG_ITEM cval;
WT_CONNECTION_IMPL *conn;
WT_DECL_RET;
@@ -546,6 +547,10 @@ __checkpoint_prepare(WT_SESSION_IMPL *session, bool *trackingp, const char *cfg[
__wt_epoch(session, &conn->ckpt_prep_start);
WT_RET(__wt_txn_begin(session, txn_cfg));
+ /* Wait 1000 microseconds to simulate slowdown in checkpoint prepare. */
+ tsp.tv_sec = 0;
+ tsp.tv_nsec = WT_MILLION;
+ __checkpoint_timing_stress(session, WT_TIMING_STRESS_PREPARE_CHECKPOINT_DELAY, &tsp);
original_snap_min = session->txn->snap_min;
WT_DIAGNOSTIC_YIELD;
@@ -748,6 +753,7 @@ __txn_checkpoint_can_skip(
static int
__txn_checkpoint(WT_SESSION_IMPL *session, const char *cfg[])
{
+ struct timespec tsp;
WT_CACHE *cache;
WT_CONNECTION_IMPL *conn;
WT_DATA_HANDLE *hs_dhandle;
@@ -870,11 +876,14 @@ __txn_checkpoint(WT_SESSION_IMPL *session, const char *cfg[])
if (full && logging)
WT_ERR(__wt_txn_checkpoint_log(session, full, WT_TXN_LOG_CKPT_START, NULL));
- __checkpoint_timing_stress(session, false);
+ /* Add a ten second wait to simulate checkpoint slowness. */
+ tsp.tv_sec = 10;
+ tsp.tv_nsec = 0;
+ __checkpoint_timing_stress(session, WT_TIMING_STRESS_CHECKPOINT_SLOW, &tsp);
WT_ERR(__checkpoint_apply_to_dhandles(session, cfg, __checkpoint_tree_helper));
/* Wait prior to checkpointing the history store to simulate checkpoint slowness. */
- __checkpoint_timing_stress(session, true);
+ __checkpoint_timing_stress(session, WT_TIMING_STRESS_HS_CHECKPOINT_DELAY, &tsp);
/*
* Get a history store dhandle. If the history store file is opened for a special operation this
@@ -1915,12 +1924,12 @@ __wt_checkpoint_close(WT_SESSION_IMPL *session, bool final)
/*
* __checkpoint_timing_stress --
- * Optionally add a 10 second delay to a checkpoint to simulate a long running checkpoint for
- * debug purposes. The reason for this option is finding operations that can block while waiting
- * for a checkpoint to complete.
+ * Optionally add a delay to a checkpoint to simulate a long running checkpoint for debug
+ * purposes. The reason for this option is finding operations that can block while waiting for a
+ * checkpoint to complete.
*/
static void
-__checkpoint_timing_stress(WT_SESSION_IMPL *session, bool history_store_stress)
+__checkpoint_timing_stress(WT_SESSION_IMPL *session, uint64_t flag, struct timespec *tsp)
{
WT_CONNECTION_IMPL *conn;
@@ -1931,9 +1940,6 @@ __checkpoint_timing_stress(WT_SESSION_IMPL *session, bool history_store_stress)
* the session used is either of the two sessions set aside for internal checkpoints.
*/
if (conn->ckpt_session != session && conn->meta_ckpt_session != session &&
- ((FLD_ISSET(conn->timing_stress_flags, WT_TIMING_STRESS_CHECKPOINT_SLOW) &&
- !history_store_stress) ||
- (FLD_ISSET(conn->timing_stress_flags, WT_TIMING_STRESS_HS_CHECKPOINT_DELAY) &&
- history_store_stress)))
- __wt_sleep(10, 0);
+ FLD_ISSET(conn->timing_stress_flags, flag))
+ __wt_sleep((uint64_t)tsp->tv_sec, (uint64_t)tsp->tv_nsec / WT_THOUSAND);
}
diff --git a/src/third_party/wiredtiger/test/csuite/timestamp_abort/main.c b/src/third_party/wiredtiger/test/csuite/timestamp_abort/main.c
index a9ebfcd085b..28a85d08ed2 100644
--- a/src/third_party/wiredtiger/test/csuite/timestamp_abort/main.c
+++ b/src/third_party/wiredtiger/test/csuite/timestamp_abort/main.c
@@ -78,7 +78,7 @@ static const char *const uri_shadow = "shadow";
static const char *const ckpt_file = "checkpoint_done";
-static bool compat, inmem, use_ts;
+static bool compat, inmem, stress, use_ts;
static volatile uint64_t global_ts = 1;
#define ENV_CONFIG_COMPAT ",compatibility=(release=\"2.9\")"
@@ -87,11 +87,12 @@ static volatile uint64_t global_ts = 1;
"debug_mode=(table_logging=true,checkpoint_retention=5)," \
"eviction_updates_trigger=95,eviction_updates_target=80," \
"log=(archive=true,file_max=10M,enabled),session_max=%d," \
- "statistics=(fast),statistics_log=(wait=1,json=true),"
+ "statistics=(fast),statistics_log=(wait=1,json=true)"
#define ENV_CONFIG_TXNSYNC \
ENV_CONFIG_DEF \
- "transaction_sync=(enabled,method=none)"
+ ",transaction_sync=(enabled,method=none)"
#define ENV_CONFIG_REC "log=(archive=false,recover=on)"
+#define ENV_CONFIG_STRESS ",timing_stress_for_test=[prepare_checkpoint_delay]"
typedef struct {
uint64_t absent_key; /* Last absent key */
@@ -423,6 +424,8 @@ run_workload(uint32_t nth)
testutil_check(__wt_snprintf(envconf, sizeof(envconf), ENV_CONFIG_TXNSYNC, SESSION_MAX));
if (compat)
strcat(envconf, ENV_CONFIG_COMPAT);
+ if (stress)
+ strcat(envconf, ENV_CONFIG_STRESS);
testutil_check(wiredtiger_open(NULL, NULL, envconf, &conn));
testutil_check(conn->open_session(conn, NULL, NULL, &session));
@@ -549,7 +552,7 @@ main(int argc, char *argv[])
(void)testutil_set_progname(argv);
- compat = inmem = false;
+ compat = inmem = stress = false;
use_ts = true;
nth = MIN_TH;
rand_th = rand_time = true;
@@ -557,7 +560,7 @@ main(int argc, char *argv[])
verify_only = false;
working_dir = "WT_TEST.timestamp-abort";
- while ((ch = __wt_getopt(progname, argc, argv, "Ch:LmT:t:vz")) != EOF)
+ while ((ch = __wt_getopt(progname, argc, argv, "Ch:LmsT:t:vz")) != EOF)
switch (ch) {
case 'C':
compat = true;
@@ -571,6 +574,9 @@ main(int argc, char *argv[])
case 'm':
inmem = true;
break;
+ case 's':
+ stress = true;
+ break;
case 'T':
rand_th = false;
nth = (uint32_t)atoi(__wt_optarg);
@@ -626,12 +632,14 @@ main(int argc, char *argv[])
}
printf(
- "Parent: compatibility: %s, "
- "in-mem log sync: %s, timestamp in use: %s\n",
- compat ? "true" : "false", inmem ? "true" : "false", use_ts ? "true" : "false");
+ "Parent: compatibility: %s, in-mem log sync: %s, add timing stress: %s, "
+ "timestamp in use: %s\n",
+ compat ? "true" : "false", inmem ? "true" : "false", stress ? "true" : "false",
+ use_ts ? "true" : "false");
printf("Parent: Create %" PRIu32 " threads; sleep %" PRIu32 " seconds\n", nth, timeout);
- printf("CONFIG: %s%s%s%s -h %s -T %" PRIu32 " -t %" PRIu32 "\n", progname,
- compat ? " -C" : "", inmem ? " -m" : "", !use_ts ? " -z" : "", working_dir, nth, timeout);
+ printf("CONFIG: %s%s%s%s%s -h %s -T %" PRIu32 " -t %" PRIu32 "\n", progname,
+ compat ? " -C" : "", inmem ? " -m" : "", stress ? " -s" : "", !use_ts ? " -z" : "",
+ working_dir, nth, timeout);
/*
* Fork a child to insert as many items. We will then randomly kill the child, run recovery
* and make sure all items we wrote exist after recovery runs.
diff --git a/src/third_party/wiredtiger/test/csuite/timestamp_abort/smoke.sh b/src/third_party/wiredtiger/test/csuite/timestamp_abort/smoke.sh
index 324e981dd70..0cac6a56ea4 100755
--- a/src/third_party/wiredtiger/test/csuite/timestamp_abort/smoke.sh
+++ b/src/third_party/wiredtiger/test/csuite/timestamp_abort/smoke.sh
@@ -2,16 +2,25 @@
set -e
-# Smoke-test timestamp-abort as part of running "make check".
+# Smoke-test timestamp-abort as part of running "make check". Use the -s option
+# to add a stress timing in checkpoint prepare.
+
+default_test_args="-t 10 -T 5"
+while getopts ":s" opt; do
+ case $opt in
+ s) default_test_args="$default_test_args -s" ;;
+ esac
+done
+
# If $top_builddir/$top_srcdir aren't set, default to building in build_posix
# and running in test/csuite.
top_builddir=${top_builddir:-../../build_posix}
top_srcdir=${top_srcdir:-../..}
- $TEST_WRAPPER $top_builddir/test/csuite/test_timestamp_abort -t 10 -T 5
-#$TEST_WRAPPER $top_builddir/test/csuite/test_timestamp_abort -t 10 -T 5 -L
- $TEST_WRAPPER $top_builddir/test/csuite/test_timestamp_abort -m -t 10 -T 5
-#$TEST_WRAPPER $top_builddir/test/csuite/test_timestamp_abort -m -t 10 -T 5 -L
- $TEST_WRAPPER $top_builddir/test/csuite/test_timestamp_abort -C -t 10 -T 5
- $TEST_WRAPPER $top_builddir/test/csuite/test_timestamp_abort -C -m -t 10 -T 5
+$TEST_WRAPPER $top_builddir/test/csuite/test_timestamp_abort $default_test_args
+#$TEST_WRAPPER $top_builddir/test/csuite/test_timestamp_abort $default_test_args -L
+$TEST_WRAPPER $top_builddir/test/csuite/test_timestamp_abort -m $default_test_args
+#$TEST_WRAPPER $top_builddir/test/csuite/test_timestamp_abort -m $default_test_args -L
+$TEST_WRAPPER $top_builddir/test/csuite/test_timestamp_abort -C $default_test_args
+$TEST_WRAPPER $top_builddir/test/csuite/test_timestamp_abort -C -m $default_test_args
diff --git a/src/third_party/wiredtiger/test/evergreen.yml b/src/third_party/wiredtiger/test/evergreen.yml
index 68ac9001277..cfbfe0996f9 100755
--- a/src/third_party/wiredtiger/test/evergreen.yml
+++ b/src/third_party/wiredtiger/test/evergreen.yml
@@ -224,22 +224,29 @@ functions:
set -o verbose
for i in $(seq ${times|1}); do
- # Run the various combinations of args. Let time and threads be random.
+ # Run the various combinations of args. Let time and threads be random. Add a
+ # timing stress to test_timestamp_abort every other run.
+ if [ $(( $i % 2 )) -eq 0 ]; then
+ test_timestamp_abort_args=-s
+ else
+ test_timestamp_abort_args=
+ fi
+
# Run current version with write-no-sync txns.
${test_env_vars|} ./test_random_abort 2>&1
- ${test_env_vars|} ./test_timestamp_abort 2>&1
+ ${test_env_vars|} ./test_timestamp_abort $test_timestamp_abort_args 2>&1
# Current version with memory-based txns (MongoDB usage).
${test_env_vars|} ./test_random_abort -m 2>&1
- ${test_env_vars|} ./test_timestamp_abort -m 2>&1
+ ${test_env_vars|} ./test_timestamp_abort -m $test_timestamp_abort_args 2>&1
# V1 log compatibility mode with write-no-sync txns.
${test_env_vars|} ./test_random_abort -C 2>&1
- ${test_env_vars|} ./test_timestamp_abort -C 2>&1
+ ${test_env_vars|} ./test_timestamp_abort -C $test_timestamp_abort_args 2>&1
# V1 log compatibility mode with memory-based txns.
${test_env_vars|} ./test_random_abort -C -m 2>&1
- ${test_env_vars|} ./test_timestamp_abort -C -m 2>&1
+ ${test_env_vars|} ./test_timestamp_abort -C -m $test_timestamp_abort_args 2>&1
${test_env_vars|} ./test_truncated_log ${truncated_log_args|} 2>&1
@@ -894,6 +901,21 @@ tasks:
${test_env_vars|} $(pwd)/../test/csuite/timestamp_abort/smoke.sh 2>&1
+ - name: csuite-timestamp-abort-stress-test
+ tags: ["pull_request"]
+ depends_on:
+ - name: compile
+ commands:
+ - func: "fetch artifacts"
+ - command: shell.exec
+ params:
+ working_dir: "wiredtiger/build_posix"
+ script: |
+ set -o errexit
+ set -o verbose
+
+ ${test_env_vars|} $(pwd)/../test/csuite/timestamp_abort/smoke.sh -s 2>&1
+
- name: csuite-scope-test
tags: ["pull_request"]
depends_on:
@@ -1631,7 +1653,18 @@ tasks:
ulimit -c unlimited
largescale/run-million-collection-test.sh .
- - name: compatibility-test-for-releases-full
+ - name: compatibility-test-for-newer-releases
+ commands:
+ - func: "get project"
+ - command: shell.exec
+ params:
+ working_dir: "wiredtiger"
+ script: |
+ set -o errexit
+ set -o verbose
+ test/evergreen/compatibility_test_for_releases.sh -n
+
+ - name: compatibility-test-for-older-releases
commands:
- func: "get project"
- command: shell.exec
@@ -1640,9 +1673,9 @@ tasks:
script: |
set -o errexit
set -o verbose
- test/evergreen/compatibility_test_for_releases.sh -l
+ test/evergreen/compatibility_test_for_releases.sh -o
- - name: compatibility-test-for-releases
+ - name: compatibility-test-for-wt-standalone-releases
commands:
- func: "get project"
- command: shell.exec
@@ -1651,7 +1684,7 @@ tasks:
script: |
set -o errexit
set -o verbose
- test/evergreen/compatibility_test_for_releases.sh
+ test/evergreen/compatibility_test_for_releases.sh -w
- name: generate-datafile-little-endian
depends_on:
@@ -2481,20 +2514,21 @@ buildvariants:
tasks:
- name: million-collection-test
-- name: compatibility-tests-full
- display_name: Compatibility tests full
+- name: compatibility-tests-less-frequent
+ display_name: Compatibility tests (less frequent)
batchtime: 10080 # 7 days
run_on:
- ubuntu1804-test
tasks:
- - name: compatibility-test-for-releases-full
+ - name: compatibility-test-for-older-releases
+ - name: compatibility-test-for-wt-standalone-releases
- name: compatibility-tests
display_name: Compatibility tests
run_on:
- ubuntu1804-test
tasks:
- - name: compatibility-test-for-releases
+ - name: compatibility-test-for-newer-releases
- name: windows-64
display_name: "! Windows 64-bit"
diff --git a/src/third_party/wiredtiger/test/evergreen/compatibility_test_for_releases.sh b/src/third_party/wiredtiger/test/evergreen/compatibility_test_for_releases.sh
index 551bbd78764..bf5f9fed505 100755
--- a/src/third_party/wiredtiger/test/evergreen/compatibility_test_for_releases.sh
+++ b/src/third_party/wiredtiger/test/evergreen/compatibility_test_for_releases.sh
@@ -1,7 +1,6 @@
#!/usr/bin/env bash
##############################################################################################
# Check branches to ensure forward/backward compatibility, including some upgrade/downgrade testing.
-# Pass in -l to trigger the longer version of this test which tests more variants.
##############################################################################################
set -e
@@ -151,53 +150,90 @@ upgrade_downgrade()
done
}
+# Only one of below flags will be set by the 1st argument of the script.
+older=false
+newer=false
+wt_standalone=false
+
+# Branches in below 2 arrays should be put in newer-to-older order.
+#
+# An overlap (last element of the 1st array & first element of the 2nd array)
+# is expected to avoid missing the edge testing coverage.
+#
+# The 2 arrays should be adjusted over time when newer branches are created,
+# or older branches are EOL.
+newer_release_branches=(develop mongodb-4.6 mongodb-4.4 mongodb-4.2)
+older_release_branches=(mongodb-4.2 mongodb-4.0 mongodb-3.6)
+
+declare -A scopes
+scopes[newer]="newer stable release branches"
+scopes[older]="older stable release branches"
+scopes[wt_standalone]="WiredTiger standalone releases"
+
#############################################################
-# usage strinf
+# usage string
#############################################################
usage()
{
- echo "Usage: \tcompatibility_test_for_releases [-l]"
- echo "\t-l\trun additional variants of wiredtiger"
+ echo -e "Usage: \tcompatibility_test_for_releases [-n|-o|-w]"
+ echo -e "\t-n\trun compatibility tests for ${scopes[newer]}"
+ echo -e "\t-o\trun compatibility tests for ${scopes[older]}"
+ echo -e "\t-w\trun compatibility tests for ${scopes[wt_standalone]}"
exit 1
}
-long=false
-
-if [ $# -eq 1 ]; then
- if [ $1 = "-l" ]; then
- echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-="
- echo "Performing long compatibility test run"
- echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-="
- long=true
- else
- (usage)
- fi
-else
- if [ $# -gt 1 ]; then
- (usage)
- fi
+if [ $# -ne 1 ]; then
+ usage
fi
+# Script argument processing
+case $1 in
+"-n")
+ newer=true
+ echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-="
+ echo "Performing compatibility tests for ${scopes[newer]}"
+ echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-="
+;;
+"-o")
+ older=true
+ echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-="
+ echo "Performing compatibility tests for ${scopes[older]}"
+ echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-="
+;;
+"-w")
+ wt_standalone=true
+ echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-="
+ echo "Performing compatibility tests for ${scopes[wt_standalone]}"
+ echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-="
+;;
+*)
+ usage
+;;
+esac
+
# Create a directory in which to do the work.
top="test-compatibility-run"
rm -rf "$top" && mkdir "$top"
cd "$top"
# Build the branches.
-if [ "$long" = true ]; then
- (build_branch mongodb-3.4)
- (build_branch mongodb-3.6)
- (build_branch mongodb-4.0)
+if [ "$newer" = true ]; then
+ for b in ${newer_release_branches[@]}; do
+ (build_branch $b)
+ done
+fi
+
+if [ "$older" = true ]; then
+ for b in ${older_release_branches[@]}; do
+ (build_branch $b)
+ done
fi
-(build_branch mongodb-4.2)
-(build_branch mongodb-4.4)
-(build_branch mongodb-4.6)
-(build_branch develop)
# Get the names of the last two WiredTiger releases, wt1 is the most recent release, wt2 is the
# release before that. Minor trickiness, we depend on the "develop" directory already existing
# so we have a source in which to do git commands.
-if [ "$long" = true ]; then
+if [ "${wt_standalone}" = true ]; then
+ (build_branch develop)
cd develop; wt1=$(get_prev_version 1); cd ..
(build_branch "$wt1")
cd develop; wt2=$(get_prev_version 2); cd ..
@@ -205,42 +241,67 @@ if [ "$long" = true ]; then
fi
# Run format in each branch for supported access methods.
-if [ "$long" = true ]; then
- (run_format mongodb-3.4 "fix row var")
- (run_format mongodb-3.6 "fix row var")
- (run_format mongodb-4.0 "fix row var")
+if [ "$newer" = true ]; then
+ for b in ${newer_release_branches[@]}; do
+ (run_format $b "row")
+ done
fi
-(run_format mongodb-4.2 "fix row var")
-(run_format mongodb-4.4 "row")
-(run_format mongodb-4.6 "row")
-(run_format develop "row")
-if [ "$long" = true ]; then
+
+if [ "$older" = true ]; then
+ for b in ${older_release_branches[@]}; do
+ (run_format $b "fix row var")
+ done
+fi
+
+if [ "${wt_standalone}" = true ]; then
(run_format "$wt1" "fix row var")
(run_format "$wt2" "fix row var")
fi
# Verify backward compatibility for supported access methods.
-if [ "$long" = true ]; then
- (verify_branches mongodb-3.6 mongodb-3.4 "fix row var")
- (verify_branches mongodb-4.0 mongodb-3.6 "fix row var")
- (verify_branches mongodb-4.2 mongodb-4.0 "fix row var")
+#
+# The branch array includes a list of branches in newer-to-older order.
+# For backport compatibility, the binary of the newer branch should
+# be used to verify the data files generated by the older branch.
+# e.g. (verify_branches mongodb-4.4 mongodb-4.2 "row")
+if [ "$newer" = true ]; then
+ for i in ${!newer_release_branches[@]}; do
+ [[ $((i+1)) < ${#newer_release_branches[@]} ]] && \
+ (verify_branches ${newer_release_branches[$i]} ${newer_release_branches[$((i+1))]} "row")
+ done
fi
-(verify_branches mongodb-4.4 mongodb-4.2 "fix row var")
-(verify_branches mongodb-4.6 mongodb-4.4 "row")
-(verify_branches develop mongodb-4.6 "row")
-if [ "$long" = true ]; then
- (verify_branches "$wt1" "$wt2" "row")
+
+if [ "$older" = true ]; then
+ for i in ${!older_release_branches[@]}; do
+ [[ $((i+1)) < ${#older_release_branches[@]} ]] && \
+ (verify_branches ${older_release_branches[$i]} ${older_release_branches[$((i+1))]} "fix row var")
+ done
+fi
+
+if [ "${wt_standalone}" = true ]; then
(verify_branches develop "$wt1" "row")
+ (verify_branches "$wt1" "$wt2" "row")
fi
# Verify forward compatibility for supported access methods.
-(verify_branches mongodb-4.2 mongodb-4.4 "row")
-(verify_branches mongodb-4.4 mongodb-4.6 "row")
-(verify_branches mongodb-4.6 develop "row")
+#
+# The branch array includes a list of branches in newer-to-older order.
+# For forward compatibility, the binary of the older branch should
+# be used to verify the data files generated by the newer branch.
+# e.g. (verify_branches mongodb-4.2 mongodb-4.4 "row")
+if [ "$newer" = true ]; then
+ for i in ${!newer_release_branches[@]}; do
+ [[ $((i+1)) < ${#newer_release_branches[@]} ]] && \
+ (verify_branches ${newer_release_branches[$((i+1))]} ${newer_release_branches[$i]} "row")
+ done
+fi
# Upgrade/downgrade testing for supported access methods.
-(upgrade_downgrade mongodb-4.2 mongodb-4.4 "row")
-(upgrade_downgrade mongodb-4.4 mongodb-4.6"row")
-(upgrade_downgrade mongodb-4.6 develop "row")
+if [ "$newer" = true ]; then
+ for i in ${!newer_release_branches[@]}; do
+ [[ $((i+1)) < ${#newer_release_branches[@]} ]] && \
+ (upgrade_downgrade ${newer_release_branches[$((i+1))]} ${newer_release_branches[$i]} "row")
+ done
+fi
exit 0
diff --git a/src/third_party/wiredtiger/test/format/config.h b/src/third_party/wiredtiger/test/format/config.h
index b8f2922021e..f1aa17e85fd 100644
--- a/src/third_party/wiredtiger/test/format/config.h
+++ b/src/third_party/wiredtiger/test/format/config.h
@@ -300,6 +300,10 @@ static CONFIG c[] = {
{"stress.checkpoint", "stress checkpoints", C_BOOL, 2, 0, 0, &g.c_timing_stress_checkpoint, NULL},
/* 2% */
+ {"stress.checkpoint_prepare", "stress checkpoint prepare", C_BOOL, 2, 0, 0,
+ &g.c_timing_stress_checkpoint_prepare, 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 4f7db16a3c0..c5a3decdbac 100644
--- a/src/third_party/wiredtiger/test/format/format.h
+++ b/src/third_party/wiredtiger/test/format/format.h
@@ -215,6 +215,7 @@ typedef struct {
uint32_t c_timing_stress_checkpoint;
uint32_t c_timing_stress_hs_checkpoint_delay;
uint32_t c_timing_stress_hs_sweep;
+ uint32_t c_timing_stress_checkpoint_prepare;
uint32_t c_timing_stress_split_1;
uint32_t c_timing_stress_split_2;
uint32_t c_timing_stress_split_3;
diff --git a/src/third_party/wiredtiger/test/format/wts.c b/src/third_party/wiredtiger/test/format/wts.c
index cc27ec32213..42b75e48c98 100644
--- a/src/third_party/wiredtiger/test/format/wts.c
+++ b/src/third_party/wiredtiger/test/format/wts.c
@@ -232,6 +232,8 @@ create_database(const char *home, WT_CONNECTION **connp)
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_hs_checkpoint_delay)
CONFIG_APPEND(p, ",history_store_checkpoint_delay");
if (g.c_timing_stress_hs_sweep)