summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlison Felizzi <alison.felizzi@mongodb.com>2022-01-06 04:02:35 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-01-06 04:30:02 +0000
commitf8f2f287f21bda38e9634199f3dc49352cd03db2 (patch)
tree2e171fecb078a5fdab54053d52eb0750445ed8b5
parente5c7aee8290aaa50912ad93b46f11980c430a4ec (diff)
downloadmongo-f8f2f287f21bda38e9634199f3dc49352cd03db2.tar.gz
Import wiredtiger: f9db14cbb0d07554e1e162e15b2504fd0f1c14d4 from branch mongodb-master
ref: 10a31dcae6..f9db14cbb0 for: 5.3.0 WT-8439 test_wt8246_compact_rts_data_correctness failed with invalid argument
-rw-r--r--src/third_party/wiredtiger/dist/api_data.py7
-rw-r--r--src/third_party/wiredtiger/import.data2
-rw-r--r--src/third_party/wiredtiger/src/config/config_def.c10
-rw-r--r--src/third_party/wiredtiger/test/csuite/wt8246_compact_rts_data_correctness/main.c21
4 files changed, 23 insertions, 17 deletions
diff --git a/src/third_party/wiredtiger/dist/api_data.py b/src/third_party/wiredtiger/dist/api_data.py
index af6df028ffc..f3d1c145e59 100644
--- a/src/third_party/wiredtiger/dist/api_data.py
+++ b/src/third_party/wiredtiger/dist/api_data.py
@@ -864,9 +864,10 @@ connection_runtime_config = [
type='list', undoc=True,
choices=[
'aggressive_sweep', 'backup_rename', 'checkpoint_reserved_txnid_delay', 'checkpoint_slow',
- 'failpoint_history_store_delete_key_from_ts', 'history_store_checkpoint_delay',
- 'history_store_search', 'history_store_sweep_race', 'prepare_checkpoint_delay', 'split_1',
- 'split_2', 'split_3', 'split_4', 'split_5', 'split_6', 'split_7']),
+ 'compact_slow', 'failpoint_history_store_delete_key_from_ts',
+ 'history_store_checkpoint_delay', 'history_store_search', 'history_store_sweep_race',
+ 'prepare_checkpoint_delay', 'split_1', 'split_2', 'split_3', 'split_4', 'split_5',
+ 'split_6', 'split_7']),
Config('verbose', '[]', r'''
enable messages for various subsystems and operations. Options are given as a list,
where each message type can optionally define an associated verbosity level, such as
diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data
index d42e591e09c..e47179b395c 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": "10a31dcae6b251e3e3efdfd1e73850158a1cdced"
+ "commit": "f9db14cbb0d07554e1e162e15b2504fd0f1c14d4"
}
diff --git a/src/third_party/wiredtiger/src/config/config_def.c b/src/third_party/wiredtiger/src/config/config_def.c
index 23d6bfad626..c60f9be912e 100644
--- a/src/third_party/wiredtiger/src/config/config_def.c
+++ b/src/third_party/wiredtiger/src/config/config_def.c
@@ -159,7 +159,7 @@ static const WT_CONFIG_CHECK confchk_WT_CONNECTION_reconfigure[] = {
{"timing_stress_for_test", "list", NULL,
"choices=[\"aggressive_sweep\",\"backup_rename\","
"\"checkpoint_reserved_txnid_delay\",\"checkpoint_slow\","
- "\"failpoint_history_store_delete_key_from_ts\","
+ "\"compact_slow\",\"failpoint_history_store_delete_key_from_ts\","
"\"history_store_checkpoint_delay\",\"history_store_search\","
"\"history_store_sweep_race\",\"prepare_checkpoint_delay\","
"\"split_1\",\"split_2\",\"split_3\",\"split_4\",\"split_5\","
@@ -896,7 +896,7 @@ static const WT_CONFIG_CHECK confchk_wiredtiger_open[] = {
{"timing_stress_for_test", "list", NULL,
"choices=[\"aggressive_sweep\",\"backup_rename\","
"\"checkpoint_reserved_txnid_delay\",\"checkpoint_slow\","
- "\"failpoint_history_store_delete_key_from_ts\","
+ "\"compact_slow\",\"failpoint_history_store_delete_key_from_ts\","
"\"history_store_checkpoint_delay\",\"history_store_search\","
"\"history_store_sweep_race\",\"prepare_checkpoint_delay\","
"\"split_1\",\"split_2\",\"split_3\",\"split_4\",\"split_5\","
@@ -979,7 +979,7 @@ static const WT_CONFIG_CHECK confchk_wiredtiger_open_all[] = {
{"timing_stress_for_test", "list", NULL,
"choices=[\"aggressive_sweep\",\"backup_rename\","
"\"checkpoint_reserved_txnid_delay\",\"checkpoint_slow\","
- "\"failpoint_history_store_delete_key_from_ts\","
+ "\"compact_slow\",\"failpoint_history_store_delete_key_from_ts\","
"\"history_store_checkpoint_delay\",\"history_store_search\","
"\"history_store_sweep_race\",\"prepare_checkpoint_delay\","
"\"split_1\",\"split_2\",\"split_3\",\"split_4\",\"split_5\","
@@ -1059,7 +1059,7 @@ static const WT_CONFIG_CHECK confchk_wiredtiger_open_basecfg[] = {
{"timing_stress_for_test", "list", NULL,
"choices=[\"aggressive_sweep\",\"backup_rename\","
"\"checkpoint_reserved_txnid_delay\",\"checkpoint_slow\","
- "\"failpoint_history_store_delete_key_from_ts\","
+ "\"compact_slow\",\"failpoint_history_store_delete_key_from_ts\","
"\"history_store_checkpoint_delay\",\"history_store_search\","
"\"history_store_sweep_race\",\"prepare_checkpoint_delay\","
"\"split_1\",\"split_2\",\"split_3\",\"split_4\",\"split_5\","
@@ -1137,7 +1137,7 @@ static const WT_CONFIG_CHECK confchk_wiredtiger_open_usercfg[] = {
{"timing_stress_for_test", "list", NULL,
"choices=[\"aggressive_sweep\",\"backup_rename\","
"\"checkpoint_reserved_txnid_delay\",\"checkpoint_slow\","
- "\"failpoint_history_store_delete_key_from_ts\","
+ "\"compact_slow\",\"failpoint_history_store_delete_key_from_ts\","
"\"history_store_checkpoint_delay\",\"history_store_search\","
"\"history_store_sweep_race\",\"prepare_checkpoint_delay\","
"\"split_1\",\"split_2\",\"split_3\",\"split_4\",\"split_5\","
diff --git a/src/third_party/wiredtiger/test/csuite/wt8246_compact_rts_data_correctness/main.c b/src/third_party/wiredtiger/test/csuite/wt8246_compact_rts_data_correctness/main.c
index 0548f028bf2..d11e3781317 100644
--- a/src/third_party/wiredtiger/test/csuite/wt8246_compact_rts_data_correctness/main.c
+++ b/src/third_party/wiredtiger/test/csuite/wt8246_compact_rts_data_correctness/main.c
@@ -29,9 +29,9 @@
#include <sys/wait.h>
#include <signal.h>
-#define TIMEOUT 4
+#define TIMEOUT 1
-#define NUM_RECORDS 1200000
+#define NUM_RECORDS 800000
#define ENV_CONFIG_REC "log=(archive=false,recover=on)"
/* Constants and variables declaration. */
@@ -40,7 +40,8 @@
* better view on what is happening.
*/
static const char conn_config[] =
- "create,cache_size=1GB,statistics=(all),statistics_log=(wait=1,json=true,on_close=true)";
+ "create,cache_size=1GB,timing_stress_for_test=[compact_slow],statistics=(all),statistics_log=("
+ "wait=1,json=true,on_close=true)";
static const char table_config_row[] =
"allocation_size=4KB,leaf_page_max=4KB,key_format=Q,value_format=QQQS";
static const char table_config_col[] =
@@ -149,9 +150,9 @@ run_test(bool column_store, const char *uri, bool preserve)
/* parent */
/*
- * Sleep for the configured amount of time before killing the child. Start the timeout from the
- * time we notice that child process has started compact. That allows the test to run correctly
- * on really slow machines.
+ * This test uses timing stress in compact so sleep for the configured amount of time before
+ * killing the child. Start the timeout from the time we notice that child process has started
+ * compact. That allows the test to run correctly on really slow machines.
*/
testutil_check(__wt_snprintf(compact_file, sizeof(compact_file), compact_file_fmt, home));
while (stat(compact_file, &sb) != 0)
@@ -253,8 +254,6 @@ workload_compact(const char *home, const char *table_config, const char *uri)
testutil_check(__wt_snprintf(tscfg, sizeof(tscfg), "stable_timestamp=%d", 30));
testutil_check(conn->set_timestamp(conn, tscfg));
- testutil_check(session->checkpoint(session, NULL));
-
/*
* Remove 1/3 of data from the middle of the key range to let compact relocate blocks from the
* end of the file. Checkpoint the changes after the removal.
@@ -262,6 +261,12 @@ workload_compact(const char *home, const char *table_config, const char *uri)
remove_records(session, uri, 60);
/*
+ * Force checkpoint is the first step in the compact operation, we do the same thing here to
+ * save some time in the compact operation.
+ */
+ testutil_check(session->checkpoint(session, "force"));
+
+ /*
* Create the compact_started file so that the parent process can start its timer.
*/
testutil_check(__wt_snprintf(compact_file, sizeof(compact_file), compact_file_fmt, home));