summaryrefslogtreecommitdiff
path: root/src/third_party
diff options
context:
space:
mode:
authorChenhao Qu <chenhao.qu@mongodb.com>2022-06-29 13:09:43 +1000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-06-29 03:38:45 +0000
commit40b58c87cb1ff64b81434351543d617f27d3f7f9 (patch)
tree35860d92a3b6a5fbacfac0ba93ef3182683ed108 /src/third_party
parent539c993b02d8e26c9b16501e177dcddf43dba8aa (diff)
downloadmongo-40b58c87cb1ff64b81434351543d617f27d3f7f9.tar.gz
Import wiredtiger: 7db45aa489365d49d0f90e4089a20a3ffd6af29d from branch mongodb-master
ref: 7465e7e9fa..7db45aa489 for: 6.1.0-rc0 WT-9495 Create debug flag to make checkpoint perform eviction on reconcilling pages (#8077)
Diffstat (limited to 'src/third_party')
-rw-r--r--src/third_party/wiredtiger/dist/api_data.py11
-rw-r--r--src/third_party/wiredtiger/import.data2
-rw-r--r--src/third_party/wiredtiger/src/btree/bt_sync.c4
-rw-r--r--src/third_party/wiredtiger/src/config/config_def.c25
-rw-r--r--src/third_party/wiredtiger/src/conn/conn_api.c1
-rw-r--r--src/third_party/wiredtiger/src/include/connection.h41
-rw-r--r--src/third_party/wiredtiger/test/format/config.h41
-rwxr-xr-xsrc/third_party/wiredtiger/test/format/config.sh2
-rw-r--r--src/third_party/wiredtiger/test/format/config_def.c3
-rw-r--r--src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-9477299
-rw-r--r--src/third_party/wiredtiger/test/format/wts.c44
-rwxr-xr-xsrc/third_party/wiredtiger/test/suite/test_checkpoint26.py64
12 files changed, 459 insertions, 78 deletions
diff --git a/src/third_party/wiredtiger/dist/api_data.py b/src/third_party/wiredtiger/dist/api_data.py
index 9830661add1..3421c92e282 100644
--- a/src/third_party/wiredtiger/dist/api_data.py
+++ b/src/third_party/wiredtiger/dist/api_data.py
@@ -780,11 +780,12 @@ connection_runtime_config = [
stress testing of WiredTiger.''',
type='list', undoc=True,
choices=[
- 'aggressive_sweep', 'backup_rename', 'checkpoint_reserved_txnid_delay', 'checkpoint_slow',
- 'checkpoint_stop', 'compact_slow', 'evict_reposition',
- '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', 'tiered_flush_finish']),
+ 'aggressive_sweep', 'backup_rename', 'checkpoint_evict_page',
+ 'checkpoint_reserved_txnid_delay', 'checkpoint_slow', 'checkpoint_stop', 'compact_slow',
+ 'evict_reposition','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', 'tiered_flush_finish']),
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 9d9a70e287e..b0a511e5983 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": "7465e7e9fa01fa69c92dffc0e1d303f20adedf17"
+ "commit": "7db45aa489365d49d0f90e4089a20a3ffd6af29d"
}
diff --git a/src/third_party/wiredtiger/src/btree/bt_sync.c b/src/third_party/wiredtiger/src/btree/bt_sync.c
index a45d07911c1..2b29a47dbbb 100644
--- a/src/third_party/wiredtiger/src/btree/bt_sync.c
+++ b/src/third_party/wiredtiger/src/btree/bt_sync.c
@@ -610,7 +610,9 @@ __wt_sync_file(WT_SESSION_IMPL *session, WT_CACHE_OP syncop)
* Once the transaction has given up it's snapshot it is no longer safe to reconcile
* pages. That happens prior to the final metadata checkpoint.
*/
- if (F_ISSET(walk, WT_REF_FLAG_LEAF) && page->read_gen == WT_READGEN_WONT_NEED &&
+ if (F_ISSET(walk, WT_REF_FLAG_LEAF) &&
+ (page->read_gen == WT_READGEN_WONT_NEED ||
+ FLD_ISSET(conn->timing_stress_flags, WT_TIMING_STRESS_CHECKPOINT_EVICT_PAGE)) &&
!tried_eviction && F_ISSET(session->txn, WT_TXN_HAS_SNAPSHOT)) {
ret = __wt_page_release_evict(session, walk, 0);
walk = NULL;
diff --git a/src/third_party/wiredtiger/src/config/config_def.c b/src/third_party/wiredtiger/src/config/config_def.c
index a82a10e5c1d..b1bf382f603 100644
--- a/src/third_party/wiredtiger/src/config/config_def.c
+++ b/src/third_party/wiredtiger/src/config/config_def.c
@@ -154,8 +154,9 @@ static const WT_CONFIG_CHECK confchk_WT_CONNECTION_reconfigure[] = {
confchk_WT_CONNECTION_reconfigure_tiered_storage_subconfigs, 1},
{"timing_stress_for_test", "list", NULL,
"choices=[\"aggressive_sweep\",\"backup_rename\","
- "\"checkpoint_reserved_txnid_delay\",\"checkpoint_slow\","
- "\"checkpoint_stop\",\"compact_slow\",\"evict_reposition\","
+ "\"checkpoint_evict_page\",\"checkpoint_reserved_txnid_delay\","
+ "\"checkpoint_slow\",\"checkpoint_stop\",\"compact_slow\","
+ "\"evict_reposition\","
"\"failpoint_history_store_delete_key_from_ts\","
"\"history_store_checkpoint_delay\",\"history_store_search\","
"\"history_store_sweep_race\",\"prepare_checkpoint_delay\","
@@ -895,8 +896,9 @@ static const WT_CONFIG_CHECK confchk_wiredtiger_open[] = {
{"tiered_storage", "category", NULL, NULL, confchk_tiered_storage_subconfigs, 7},
{"timing_stress_for_test", "list", NULL,
"choices=[\"aggressive_sweep\",\"backup_rename\","
- "\"checkpoint_reserved_txnid_delay\",\"checkpoint_slow\","
- "\"checkpoint_stop\",\"compact_slow\",\"evict_reposition\","
+ "\"checkpoint_evict_page\",\"checkpoint_reserved_txnid_delay\","
+ "\"checkpoint_slow\",\"checkpoint_stop\",\"compact_slow\","
+ "\"evict_reposition\","
"\"failpoint_history_store_delete_key_from_ts\","
"\"history_store_checkpoint_delay\",\"history_store_search\","
"\"history_store_sweep_race\",\"prepare_checkpoint_delay\","
@@ -978,8 +980,9 @@ static const WT_CONFIG_CHECK confchk_wiredtiger_open_all[] = {
{"tiered_storage", "category", NULL, NULL, confchk_tiered_storage_subconfigs, 7},
{"timing_stress_for_test", "list", NULL,
"choices=[\"aggressive_sweep\",\"backup_rename\","
- "\"checkpoint_reserved_txnid_delay\",\"checkpoint_slow\","
- "\"checkpoint_stop\",\"compact_slow\",\"evict_reposition\","
+ "\"checkpoint_evict_page\",\"checkpoint_reserved_txnid_delay\","
+ "\"checkpoint_slow\",\"checkpoint_stop\",\"compact_slow\","
+ "\"evict_reposition\","
"\"failpoint_history_store_delete_key_from_ts\","
"\"history_store_checkpoint_delay\",\"history_store_search\","
"\"history_store_sweep_race\",\"prepare_checkpoint_delay\","
@@ -1059,8 +1062,9 @@ static const WT_CONFIG_CHECK confchk_wiredtiger_open_basecfg[] = {
{"tiered_storage", "category", NULL, NULL, confchk_tiered_storage_subconfigs, 7},
{"timing_stress_for_test", "list", NULL,
"choices=[\"aggressive_sweep\",\"backup_rename\","
- "\"checkpoint_reserved_txnid_delay\",\"checkpoint_slow\","
- "\"checkpoint_stop\",\"compact_slow\",\"evict_reposition\","
+ "\"checkpoint_evict_page\",\"checkpoint_reserved_txnid_delay\","
+ "\"checkpoint_slow\",\"checkpoint_stop\",\"compact_slow\","
+ "\"evict_reposition\","
"\"failpoint_history_store_delete_key_from_ts\","
"\"history_store_checkpoint_delay\",\"history_store_search\","
"\"history_store_sweep_race\",\"prepare_checkpoint_delay\","
@@ -1138,8 +1142,9 @@ static const WT_CONFIG_CHECK confchk_wiredtiger_open_usercfg[] = {
{"tiered_storage", "category", NULL, NULL, confchk_tiered_storage_subconfigs, 7},
{"timing_stress_for_test", "list", NULL,
"choices=[\"aggressive_sweep\",\"backup_rename\","
- "\"checkpoint_reserved_txnid_delay\",\"checkpoint_slow\","
- "\"checkpoint_stop\",\"compact_slow\",\"evict_reposition\","
+ "\"checkpoint_evict_page\",\"checkpoint_reserved_txnid_delay\","
+ "\"checkpoint_slow\",\"checkpoint_stop\",\"compact_slow\","
+ "\"evict_reposition\","
"\"failpoint_history_store_delete_key_from_ts\","
"\"history_store_checkpoint_delay\",\"history_store_search\","
"\"history_store_sweep_race\",\"prepare_checkpoint_delay\","
diff --git a/src/third_party/wiredtiger/src/conn/conn_api.c b/src/third_party/wiredtiger/src/conn/conn_api.c
index 5cc8e30c78f..b17571c5a3c 100644
--- a/src/third_party/wiredtiger/src/conn/conn_api.c
+++ b/src/third_party/wiredtiger/src/conn/conn_api.c
@@ -2248,6 +2248,7 @@ __wt_timing_stress_config(WT_SESSION_IMPL *session, const char *cfg[])
static const WT_NAME_FLAG stress_types[] = {
{"aggressive_sweep", WT_TIMING_STRESS_AGGRESSIVE_SWEEP},
{"backup_rename", WT_TIMING_STRESS_BACKUP_RENAME},
+ {"checkpoint_evict_page", WT_TIMING_STRESS_CHECKPOINT_EVICT_PAGE},
{"checkpoint_reserved_txnid_delay", WT_TIMING_STRESS_CHECKPOINT_RESERVED_TXNID_DELAY},
{"checkpoint_slow", WT_TIMING_STRESS_CHECKPOINT_SLOW},
{"checkpoint_stop", WT_TIMING_STRESS_CHECKPOINT_STOP},
diff --git a/src/third_party/wiredtiger/src/include/connection.h b/src/third_party/wiredtiger/src/include/connection.h
index 360998b2664..02b421f4191 100644
--- a/src/third_party/wiredtiger/src/include/connection.h
+++ b/src/third_party/wiredtiger/src/include/connection.h
@@ -579,26 +579,27 @@ struct __wt_connection_impl {
* Variable with flags for which subsystems the diagnostic stress timing delays have been requested.
*/
/* AUTOMATIC FLAG VALUE GENERATION START 0 */
-#define WT_TIMING_STRESS_AGGRESSIVE_SWEEP 0x00001u
-#define WT_TIMING_STRESS_BACKUP_RENAME 0x00002u
-#define WT_TIMING_STRESS_CHECKPOINT_RESERVED_TXNID_DELAY 0x00004u
-#define WT_TIMING_STRESS_CHECKPOINT_SLOW 0x00008u
-#define WT_TIMING_STRESS_CHECKPOINT_STOP 0x00010u
-#define WT_TIMING_STRESS_COMPACT_SLOW 0x00020u
-#define WT_TIMING_STRESS_EVICT_REPOSITION 0x00040u
-#define WT_TIMING_STRESS_FAILPOINT_HISTORY_STORE_DELETE_KEY_FROM_TS 0x00080u
-#define WT_TIMING_STRESS_HS_CHECKPOINT_DELAY 0x00100u
-#define WT_TIMING_STRESS_HS_SEARCH 0x00200u
-#define WT_TIMING_STRESS_HS_SWEEP 0x00400u
-#define WT_TIMING_STRESS_PREPARE_CHECKPOINT_DELAY 0x00800u
-#define WT_TIMING_STRESS_SPLIT_1 0x01000u
-#define WT_TIMING_STRESS_SPLIT_2 0x02000u
-#define WT_TIMING_STRESS_SPLIT_3 0x04000u
-#define WT_TIMING_STRESS_SPLIT_4 0x08000u
-#define WT_TIMING_STRESS_SPLIT_5 0x10000u
-#define WT_TIMING_STRESS_SPLIT_6 0x20000u
-#define WT_TIMING_STRESS_SPLIT_7 0x40000u
-#define WT_TIMING_STRESS_TIERED_FLUSH_FINISH 0x80000u
+#define WT_TIMING_STRESS_AGGRESSIVE_SWEEP 0x000001u
+#define WT_TIMING_STRESS_BACKUP_RENAME 0x000002u
+#define WT_TIMING_STRESS_CHECKPOINT_EVICT_PAGE 0x000004u
+#define WT_TIMING_STRESS_CHECKPOINT_RESERVED_TXNID_DELAY 0x000008u
+#define WT_TIMING_STRESS_CHECKPOINT_SLOW 0x000010u
+#define WT_TIMING_STRESS_CHECKPOINT_STOP 0x000020u
+#define WT_TIMING_STRESS_COMPACT_SLOW 0x000040u
+#define WT_TIMING_STRESS_EVICT_REPOSITION 0x000080u
+#define WT_TIMING_STRESS_FAILPOINT_HISTORY_STORE_DELETE_KEY_FROM_TS 0x000100u
+#define WT_TIMING_STRESS_HS_CHECKPOINT_DELAY 0x000200u
+#define WT_TIMING_STRESS_HS_SEARCH 0x000400u
+#define WT_TIMING_STRESS_HS_SWEEP 0x000800u
+#define WT_TIMING_STRESS_PREPARE_CHECKPOINT_DELAY 0x001000u
+#define WT_TIMING_STRESS_SPLIT_1 0x002000u
+#define WT_TIMING_STRESS_SPLIT_2 0x004000u
+#define WT_TIMING_STRESS_SPLIT_3 0x008000u
+#define WT_TIMING_STRESS_SPLIT_4 0x010000u
+#define WT_TIMING_STRESS_SPLIT_5 0x020000u
+#define WT_TIMING_STRESS_SPLIT_6 0x040000u
+#define WT_TIMING_STRESS_SPLIT_7 0x080000u
+#define WT_TIMING_STRESS_TIERED_FLUSH_FINISH 0x100000u
/* AUTOMATIC FLAG VALUE GENERATION STOP 32 */
uint32_t timing_stress_flags;
diff --git a/src/third_party/wiredtiger/test/format/config.h b/src/third_party/wiredtiger/test/format/config.h
index be88a9511e0..cec8efe6932 100644
--- a/src/third_party/wiredtiger/test/format/config.h
+++ b/src/third_party/wiredtiger/test/format/config.h
@@ -113,24 +113,25 @@ typedef struct {
#define V_GLOBAL_STATISTICS_SERVER 81
#define V_GLOBAL_STRESS_AGGRESSIVE_SWEEP 82
#define V_GLOBAL_STRESS_CHECKPOINT 83
-#define V_GLOBAL_STRESS_CHECKPOINT_RESERVED_TXNID_DELAY 84
-#define V_GLOBAL_STRESS_CHECKPOINT_PREPARE 85
-#define V_GLOBAL_STRESS_EVICT_REPOSITION 86
-#define V_GLOBAL_STRESS_FAILPOINT_HS_DELETE_KEY_FROM_TS 87
-#define V_GLOBAL_STRESS_HS_CHECKPOINT_DELAY 88
-#define V_GLOBAL_STRESS_HS_SEARCH 89
-#define V_GLOBAL_STRESS_HS_SWEEP 90
-#define V_GLOBAL_STRESS_SPLIT_1 91
-#define V_GLOBAL_STRESS_SPLIT_2 92
-#define V_GLOBAL_STRESS_SPLIT_3 93
-#define V_GLOBAL_STRESS_SPLIT_4 94
-#define V_GLOBAL_STRESS_SPLIT_5 95
-#define V_GLOBAL_STRESS_SPLIT_6 96
-#define V_GLOBAL_STRESS_SPLIT_7 97
-#define V_GLOBAL_TRANSACTION_IMPLICIT 98
-#define V_GLOBAL_TRANSACTION_TIMESTAMPS 99
-#define V_GLOBAL_WIREDTIGER_CONFIG 100
-#define V_GLOBAL_WIREDTIGER_RWLOCK 101
-#define V_GLOBAL_WIREDTIGER_LEAK_MEMORY 102
+#define V_GLOBAL_STRESS_CHECKPOINT_EVICT_PAGE 84
+#define V_GLOBAL_STRESS_CHECKPOINT_RESERVED_TXNID_DELAY 85
+#define V_GLOBAL_STRESS_CHECKPOINT_PREPARE 86
+#define V_GLOBAL_STRESS_EVICT_REPOSITION 87
+#define V_GLOBAL_STRESS_FAILPOINT_HS_DELETE_KEY_FROM_TS 88
+#define V_GLOBAL_STRESS_HS_CHECKPOINT_DELAY 89
+#define V_GLOBAL_STRESS_HS_SEARCH 90
+#define V_GLOBAL_STRESS_HS_SWEEP 91
+#define V_GLOBAL_STRESS_SPLIT_1 92
+#define V_GLOBAL_STRESS_SPLIT_2 93
+#define V_GLOBAL_STRESS_SPLIT_3 94
+#define V_GLOBAL_STRESS_SPLIT_4 95
+#define V_GLOBAL_STRESS_SPLIT_5 96
+#define V_GLOBAL_STRESS_SPLIT_6 97
+#define V_GLOBAL_STRESS_SPLIT_7 98
+#define V_GLOBAL_TRANSACTION_IMPLICIT 99
+#define V_GLOBAL_TRANSACTION_TIMESTAMPS 100
+#define V_GLOBAL_WIREDTIGER_CONFIG 101
+#define V_GLOBAL_WIREDTIGER_RWLOCK 102
+#define V_GLOBAL_WIREDTIGER_LEAK_MEMORY 103
-#define V_ELEMENT_COUNT 103
+#define V_ELEMENT_COUNT 104
diff --git a/src/third_party/wiredtiger/test/format/config.sh b/src/third_party/wiredtiger/test/format/config.sh
index fcbbd617df2..460208d35ab 100755
--- a/src/third_party/wiredtiger/test/format/config.sh
+++ b/src/third_party/wiredtiger/test/format/config.sh
@@ -244,6 +244,8 @@ CONFIG configuration_list[] = {
{"stress.checkpoint", "stress checkpoints", C_BOOL, 2, 0, 0}
+{"stress.checkpoint_evict_page", "stress force checkpoint to evict all reconciling pages", C_BOOL, 2, 0, 0}
+
{"stress.checkpoint_reserved_txnid_delay", "stress checkpoint invisible transaction id delay", C_BOOL, 2, 0, 0}
{"stress.checkpoint_prepare", "stress checkpoint prepare", C_BOOL, 2, 0, 0}
diff --git a/src/third_party/wiredtiger/test/format/config_def.c b/src/third_party/wiredtiger/test/format/config_def.c
index 3f6d2179358..b84cec197eb 100644
--- a/src/third_party/wiredtiger/test/format/config_def.c
+++ b/src/third_party/wiredtiger/test/format/config_def.c
@@ -260,6 +260,9 @@ CONFIG configuration_list[] = {
{"stress.checkpoint", "stress checkpoints",
C_BOOL, 2, 0, 0, V_GLOBAL_STRESS_CHECKPOINT},
+ {"stress.checkpoint_evict_page", "stress force checkpoint to evict all reconciling pages",
+ C_BOOL, 2, 0, 0, V_GLOBAL_STRESS_CHECKPOINT_EVICT_PAGE},
+
{"stress.checkpoint_reserved_txnid_delay", "stress checkpoint invisible transaction id delay",
C_BOOL, 2, 0, 0, V_GLOBAL_STRESS_CHECKPOINT_RESERVED_TXNID_DELAY},
diff --git a/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-9477 b/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-9477
new file mode 100644
index 00000000000..11090a97c0e
--- /dev/null
+++ b/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-9477
@@ -0,0 +1,299 @@
+############################################
+# RUN PARAMETERS: V3
+############################################
+assert.read_timestamp=0
+assert.write_timestamp=0
+backup=0
+backup.incremental=off
+backup.incr_granularity=5500
+block_cache=0
+block_cache.cache_on_checkpoint=1
+block_cache.cache_on_writes=1
+block_cache.size=64
+btree.huffman_value=0
+cache=10000
+cache.evict_max=1
+checkpoint=on
+checkpoint.log_size=30
+checkpoint.wait=5
+disk.data_extend=0
+disk.direct_io=0
+disk.encryption=none
+disk.mmap=1
+disk.mmap_all=0
+format.abort=0
+format.independent_thread_rng=1
+format.major_timeout=0
+import=0
+logging=0
+logging.compression=none
+logging.file_max=273976
+logging.prealloc=1
+logging.remove=0
+ops.alter=0
+ops.compaction=0
+ops.hs_cursor=0
+ops.prepare=0
+ops.random_cursor=0
+ops.salvage=0
+ops.verify=1
+quiet=0
+runs.in_memory=0
+runs.ops=0
+runs.rows=1800000
+runs.tables=9
+runs.threads=8
+runs.timer=6
+runs.type=variable-length column-store
+runs.verify_failure_dump=0
+statistics=0
+statistics.server=0
+stress.aggressive_sweep=0
+stress.checkpoint=0
+stress.checkpoint_evict_page=1
+stress.checkpoint_reserved_txnid_delay=0
+stress.checkpoint_prepare=0
+stress.evict_reposition=0
+stress.failpoint_hs_delete_key_from_ts=1
+stress.hs_checkpoint_delay=0
+stress.hs_search=0
+stress.hs_sweep=0
+stress.split_1=0
+stress.split_2=0
+stress.split_3=0
+stress.split_4=0
+stress.split_5=0
+stress.split_6=0
+stress.split_7=0
+transaction.implicit=0
+transaction.timestamps=1
+wiredtiger.rwlock=1
+wiredtiger.leak_memory=0
+############################################
+# TABLE PARAMETERS: table 1
+############################################
+table1.btree.compression=none
+table1.btree.dictionary=1
+table1.btree.internal_key_truncation=1
+table1.btree.internal_page_max=17
+table1.btree.leaf_page_max=14
+table1.btree.memory_page_max=1
+table1.btree.repeat_data_pct=38
+table1.btree.split_pct=93
+table1.btree.value_max=1918
+table1.btree.value_min=13
+table1.disk.checksum=on
+table1.disk.firstfit=0
+table1.ops.pct.delete=28
+table1.ops.pct.insert=9
+table1.ops.pct.modify=43
+table1.ops.pct.read=2
+table1.ops.pct.write=18
+table1.ops.truncate=1
+table1.runs.source=table
+############################################
+# TABLE PARAMETERS: table 2
+############################################
+table2.btree.compression=none
+table2.btree.dictionary=0
+table2.btree.internal_key_truncation=1
+table2.btree.internal_page_max=10
+table2.btree.leaf_page_max=9
+table2.btree.memory_page_max=1
+table2.btree.repeat_data_pct=0
+table2.btree.split_pct=75
+table2.btree.value_max=1956
+table2.btree.value_min=15
+table2.disk.checksum=unencrypted
+table2.disk.firstfit=0
+table2.ops.pct.delete=75
+table2.ops.pct.insert=3
+table2.ops.pct.modify=7
+table2.ops.pct.read=1
+table2.ops.pct.write=14
+table2.ops.truncate=1
+table2.runs.source=table
+############################################
+# TABLE PARAMETERS: table 3
+############################################
+table3.btree.compression=zlib
+table3.btree.dictionary=1
+table3.btree.internal_key_truncation=1
+table3.btree.internal_page_max=17
+table3.btree.key_max=93
+table3.btree.key_min=31
+table3.btree.leaf_page_max=13
+table3.btree.memory_page_max=1
+table3.btree.prefix_len=0
+table3.btree.prefix_compression=1
+table3.btree.prefix_compression_min=8
+table3.btree.reverse=0
+table3.btree.split_pct=63
+table3.btree.value_max=2725
+table3.btree.value_min=7
+table3.disk.checksum=unencrypted
+table3.disk.firstfit=1
+table3.ops.pct.delete=15
+table3.ops.pct.insert=48
+table3.ops.pct.modify=11
+table3.ops.pct.read=6
+table3.ops.pct.write=20
+table3.ops.truncate=1
+table3.runs.source=table
+table3.runs.type=row-store
+############################################
+# TABLE PARAMETERS: table 4
+############################################
+table4.btree.compression=zlib
+table4.btree.dictionary=1
+table4.btree.internal_key_truncation=1
+table4.btree.internal_page_max=16
+table4.btree.key_max=103
+table4.btree.key_min=17
+table4.btree.leaf_page_max=10
+table4.btree.memory_page_max=1
+table4.btree.prefix_len=0
+table4.btree.prefix_compression=0
+table4.btree.prefix_compression_min=1
+table4.btree.reverse=0
+table4.btree.split_pct=79
+table4.btree.value_max=43
+table4.btree.value_min=10
+table4.disk.checksum=off
+table4.disk.firstfit=0
+table4.ops.pct.delete=0
+table4.ops.pct.insert=0
+table4.ops.pct.modify=0
+table4.ops.pct.read=8
+table4.ops.pct.write=92
+table4.ops.truncate=1
+table4.runs.source=table
+table4.runs.type=row-store
+############################################
+# TABLE PARAMETERS: table 5
+############################################
+table5.btree.compression=snappy
+table5.btree.dictionary=0
+table5.btree.internal_key_truncation=1
+table5.btree.internal_page_max=16
+table5.btree.leaf_page_max=15
+table5.btree.memory_page_max=1
+table5.btree.repeat_data_pct=38
+table5.btree.split_pct=74
+table5.btree.value_max=2168
+table5.btree.value_min=19
+table5.disk.checksum=on
+table5.disk.firstfit=0
+table5.ops.pct.delete=6
+table5.ops.pct.insert=34
+table5.ops.pct.modify=2
+table5.ops.pct.read=16
+table5.ops.pct.write=42
+table5.ops.truncate=1
+table5.runs.source=file
+############################################
+# TABLE PARAMETERS: table 6
+############################################
+table6.btree.compression=snappy
+table6.btree.dictionary=0
+table6.btree.internal_key_truncation=1
+table6.btree.internal_page_max=12
+table6.btree.leaf_page_max=11
+table6.btree.memory_page_max=1
+table6.btree.repeat_data_pct=57
+table6.btree.split_pct=69
+table6.btree.value_max=3789
+table6.btree.value_min=6
+table6.disk.checksum=unencrypted
+table6.disk.firstfit=0
+table6.ops.pct.delete=1
+table6.ops.pct.insert=3
+table6.ops.pct.modify=0
+table6.ops.pct.read=96
+table6.ops.pct.write=0
+table6.ops.truncate=1
+table6.runs.source=file
+############################################
+# TABLE PARAMETERS: table 7
+############################################
+table7.btree.compression=snappy
+table7.btree.dictionary=1
+table7.btree.internal_key_truncation=1
+table7.btree.internal_page_max=12
+table7.btree.key_max=35
+table7.btree.key_min=26
+table7.btree.leaf_page_max=9
+table7.btree.memory_page_max=1
+table7.btree.prefix_len=0
+table7.btree.prefix_compression=1
+table7.btree.prefix_compression_min=3
+table7.btree.reverse=0
+table7.btree.split_pct=75
+table7.btree.value_max=1160
+table7.btree.value_min=15
+table7.disk.checksum=on
+table7.disk.firstfit=1
+table7.ops.pct.delete=12
+table7.ops.pct.insert=77
+table7.ops.pct.modify=7
+table7.ops.pct.read=1
+table7.ops.pct.write=3
+table7.ops.truncate=1
+table7.runs.source=table
+table7.runs.type=row-store
+############################################
+# TABLE PARAMETERS: table 8
+############################################
+table8.btree.compression=none
+table8.btree.dictionary=0
+table8.btree.internal_key_truncation=1
+table8.btree.internal_page_max=16
+table8.btree.key_max=127
+table8.btree.key_min=15
+table8.btree.leaf_page_max=11
+table8.btree.memory_page_max=1
+table8.btree.prefix_len=50
+table8.btree.prefix_compression=1
+table8.btree.prefix_compression_min=5
+table8.btree.reverse=0
+table8.btree.split_pct=89
+table8.btree.value_max=3359
+table8.btree.value_min=19
+table8.disk.checksum=off
+table8.disk.firstfit=1
+table8.ops.pct.delete=86
+table8.ops.pct.insert=3
+table8.ops.pct.modify=9
+table8.ops.pct.read=0
+table8.ops.pct.write=2
+table8.ops.truncate=1
+table8.runs.source=file
+table8.runs.type=row-store
+############################################
+# TABLE PARAMETERS: table 9
+############################################
+table9.btree.compression=none
+table9.btree.dictionary=0
+table9.btree.internal_key_truncation=1
+table9.btree.internal_page_max=12
+table9.btree.key_max=126
+table9.btree.key_min=13
+table9.btree.leaf_page_max=17
+table9.btree.memory_page_max=1
+table9.btree.prefix_len=0
+table9.btree.prefix_compression=1
+table9.btree.prefix_compression_min=7
+table9.btree.reverse=0
+table9.btree.split_pct=66
+table9.btree.value_max=1888
+table9.btree.value_min=5
+table9.disk.checksum=on
+table9.disk.firstfit=1
+table9.ops.pct.delete=82
+table9.ops.pct.insert=0
+table9.ops.pct.modify=9
+table9.ops.pct.read=2
+table9.ops.pct.write=7
+table9.ops.truncate=1
+table9.runs.source=table
+table9.runs.type=row-store
diff --git a/src/third_party/wiredtiger/test/format/wts.c b/src/third_party/wiredtiger/test/format/wts.c
index 0d2153e3207..aea95bcb132 100644
--- a/src/third_party/wiredtiger/test/format/wts.c
+++ b/src/third_party/wiredtiger/test/format/wts.c
@@ -147,42 +147,44 @@ static WT_EVENT_HANDLER event_handler = {
* Configure stressing settings.
*/
static void
-configure_timing_stress(char *p, size_t max)
+configure_timing_stress(char **p, size_t max)
{
- CONFIG_APPEND(p, ",timing_stress_for_test=[");
+ CONFIG_APPEND(*p, ",timing_stress_for_test=[");
if (GV(STRESS_AGGRESSIVE_SWEEP))
- CONFIG_APPEND(p, ",aggressive_sweep");
+ CONFIG_APPEND(*p, ",aggressive_sweep");
if (GV(STRESS_CHECKPOINT))
- CONFIG_APPEND(p, ",checkpoint_slow");
+ CONFIG_APPEND(*p, ",checkpoint_slow");
+ if (GV(STRESS_CHECKPOINT_EVICT_PAGE))
+ CONFIG_APPEND(*p, ",checkpoint_evict_page");
if (GV(STRESS_CHECKPOINT_PREPARE))
- CONFIG_APPEND(p, ",prepare_checkpoint_delay");
+ CONFIG_APPEND(*p, ",prepare_checkpoint_delay");
if (GV(STRESS_CHECKPOINT_RESERVED_TXNID_DELAY))
- CONFIG_APPEND(p, ",checkpoint_reserved_txnid_delay");
+ CONFIG_APPEND(*p, ",checkpoint_reserved_txnid_delay");
if (GV(STRESS_EVICT_REPOSITION))
- CONFIG_APPEND(p, ",evict_reposition");
+ CONFIG_APPEND(*p, ",evict_reposition");
if (GV(STRESS_FAILPOINT_HS_DELETE_KEY_FROM_TS))
- CONFIG_APPEND(p, ",failpoint_history_store_delete_key_from_ts");
+ CONFIG_APPEND(*p, ",failpoint_history_store_delete_key_from_ts");
if (GV(STRESS_HS_CHECKPOINT_DELAY))
- CONFIG_APPEND(p, ",history_store_checkpoint_delay");
+ CONFIG_APPEND(*p, ",history_store_checkpoint_delay");
if (GV(STRESS_HS_SEARCH))
- CONFIG_APPEND(p, ",history_store_search");
+ CONFIG_APPEND(*p, ",history_store_search");
if (GV(STRESS_HS_SWEEP))
- CONFIG_APPEND(p, ",history_store_sweep_race");
+ CONFIG_APPEND(*p, ",history_store_sweep_race");
if (GV(STRESS_SPLIT_1))
- CONFIG_APPEND(p, ",split_1");
+ CONFIG_APPEND(*p, ",split_1");
if (GV(STRESS_SPLIT_2))
- CONFIG_APPEND(p, ",split_2");
+ CONFIG_APPEND(*p, ",split_2");
if (GV(STRESS_SPLIT_3))
- CONFIG_APPEND(p, ",split_3");
+ CONFIG_APPEND(*p, ",split_3");
if (GV(STRESS_SPLIT_4))
- CONFIG_APPEND(p, ",split_4");
+ CONFIG_APPEND(*p, ",split_4");
if (GV(STRESS_SPLIT_5))
- CONFIG_APPEND(p, ",split_5");
+ CONFIG_APPEND(*p, ",split_5");
if (GV(STRESS_SPLIT_6))
- CONFIG_APPEND(p, ",split_6");
+ CONFIG_APPEND(*p, ",split_6");
if (GV(STRESS_SPLIT_7))
- CONFIG_APPEND(p, ",split_7");
- CONFIG_APPEND(p, "]");
+ CONFIG_APPEND(*p, ",split_7");
+ CONFIG_APPEND(*p, "]");
}
/*
@@ -277,7 +279,7 @@ create_database(const char *home, WT_CONNECTION **connp)
CONFIG_APPEND(p, ",statistics=(%s)", GV(STATISTICS) ? "fast" : "none");
/* Optional timing stress. */
- configure_timing_stress(p, max);
+ configure_timing_stress(&p, max);
/* Extensions. */
CONFIG_APPEND(p, ",extensions=[\"%s\", \"%s\", \"%s\", \"%s\", \"%s\", \"%s\", \"%s\"],",
@@ -477,7 +479,7 @@ wts_open(const char *home, WT_CONNECTION **connp, WT_SESSION **sessionp, bool al
CONFIG_APPEND(p, ",error_prefix=\"%s\"", progname);
/* Optional timing stress. */
- configure_timing_stress(p, max);
+ configure_timing_stress(&p, max);
/* If in-memory, there's only a single, shared WT_CONNECTION handle. */
if (GV(RUNS_IN_MEMORY) != 0)
diff --git a/src/third_party/wiredtiger/test/suite/test_checkpoint26.py b/src/third_party/wiredtiger/test/suite/test_checkpoint26.py
new file mode 100755
index 00000000000..d10edd20166
--- /dev/null
+++ b/src/third_party/wiredtiger/test/suite/test_checkpoint26.py
@@ -0,0 +1,64 @@
+#!/usr/bin/env python
+#
+# Public Domain 2014-present MongoDB, Inc.
+# Public Domain 2008-2014 WiredTiger, Inc.
+#
+# This is free and unencumbered software released into the public domain.
+#
+# Anyone is free to copy, modify, publish, use, compile, sell, or
+# distribute this software, either in source code form or as a compiled
+# binary, for any purpose, commercial or non-commercial, and by any
+# means.
+#
+# In jurisdictions that recognize copyright laws, the author or authors
+# of this software dedicate any and all copyright interest in the
+# software to the public domain. We make this dedication for the benefit
+# of the public at large and to the detriment of our heirs and
+# successors. We intend this dedication to be an overt act of
+# relinquishment in perpetuity of all present and future rights to this
+# software under copyright law.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+# OTHER DEALINGS IN THE SOFTWARE.
+
+from wiredtiger import stat
+import wttest
+
+# test_checkpoint26.py
+# Test the timing stress setting for checkpoint_evict_page.
+# The setting forces checkpoint to evict all pages that are reconciled. The debug mode is effective
+# in testing scenarios where checkpoint itself starts to evict pages. Have a big enough cache and
+# small data pages so that eviction activity is small, allowing checkpoint to reconcile and
+# evict pages.
+class test_checkpoint26(wttest.WiredTigerTestCase):
+ conn_config = 'cache_size=1000MB,statistics=(all),eviction_dirty_target=80,eviction_dirty_trigger=95,timing_stress_for_test=[checkpoint_evict_page]'
+ uri = "table:test_checkpoint26"
+
+ def test_checkpoint_evict_page(self):
+ self.session.create(self.uri, 'key_format=i,value_format=S')
+
+ cursor = self.session.open_cursor(self.uri)
+ for i in range(0, 10000):
+ self.session.begin_transaction()
+ cursor[i] = 'b' * 5000
+ self.session.commit_transaction()
+
+ # There should be no eviction activity at this point.
+ stat_cursor = self.session.open_cursor('statistics:')
+ pages_evicted_during_checkpoint = stat_cursor[stat.conn.cache_eviction_pages_in_parallel_with_checkpoint][2]
+ self.assertEqual(pages_evicted_during_checkpoint, 0)
+ stat_cursor.close()
+
+ # Make checkpoint perform eviction.
+ self.session.checkpoint()
+
+ # Read the statistics of pages that have been evicted during checkpoint.
+ stat_cursor = self.session.open_cursor('statistics:')
+ pages_evicted_during_checkpoint = stat_cursor[stat.conn.cache_eviction_pages_in_parallel_with_checkpoint][2]
+ self.assertGreater(pages_evicted_during_checkpoint, 0)
+ stat_cursor.close()