From 7cda3b8762392abd1ae718d05bdf39b9bd67ca92 Mon Sep 17 00:00:00 2001 From: Luke Chen Date: Fri, 9 Sep 2022 16:05:17 +1000 Subject: Import wiredtiger: 2a3bf2949e4e75dab96fc0e8fb1c1fd67eb243c3 from branch mongodb-6.1 ref: 672be218bf..2a3bf2949e for: 6.1.0-rc2 Revert "WT-9792 Fix RTS to remove globally visible update of the data store update from the history store (#8240)" (#8253) --- src/third_party/wiredtiger/import.data | 2 +- .../wiredtiger/src/txn/txn_rollback_to_stable.c | 24 +--- .../test/format/failure_configs/CONFIG.WT-9792 | 160 --------------------- 3 files changed, 4 insertions(+), 182 deletions(-) delete mode 100644 src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-9792 diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data index 0a0a45415c3..ddb6a6a0bd2 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-6.1", - "commit": "672be218bfa99c082c1bcd62f53bf1ad2211239e" + "commit": "2a3bf2949e4e75dab96fc0e8fb1c1fd67eb243c3" } diff --git a/src/third_party/wiredtiger/src/txn/txn_rollback_to_stable.c b/src/third_party/wiredtiger/src/txn/txn_rollback_to_stable.c index 9f980c86029..d775b8d8128 100644 --- a/src/third_party/wiredtiger/src/txn/txn_rollback_to_stable.c +++ b/src/third_party/wiredtiger/src/txn/txn_rollback_to_stable.c @@ -55,22 +55,12 @@ __rollback_delete_hs(WT_SESSION_IMPL *session, WT_ITEM *key, wt_timestamp_t ts) for (; ret == 0; ret = hs_cursor->prev(hs_cursor)) { /* Retrieve the time window from the history cursor. */ __wt_hs_upd_time_window(hs_cursor, &hs_tw); - - /* - * Remove all history store versions with a stop timestamp greater than the start/stop - * timestamp of a stable update in the data store. - */ - if (hs_tw->stop_ts <= ts) + if (hs_tw->start_ts < ts) break; WT_ERR(hs_cursor->remove(hs_cursor)); WT_STAT_CONN_DATA_INCR(session, txn_rts_hs_removed); - - /* - * The globally visible start time window's are cleared during history store reconciliation. - * Treat them also as a stable entry removal from the history store. - */ - if (hs_tw->start_ts == ts || hs_tw->start_ts == WT_TS_NONE) + if (hs_tw->start_ts == ts) WT_STAT_CONN_DATA_INCR(session, cache_hs_key_truncate_rts); else WT_STAT_CONN_DATA_INCR(session, cache_hs_key_truncate_rts_unstable); @@ -1889,15 +1879,7 @@ __rollback_to_stable_btree_apply_all(WT_SESSION_IMPL *session, wt_timestamp_t ro } WT_ERR_NOTFOUND_OK(ret, false); - /* - * Performing eviction in parallel to a checkpoint can lead to situation where the history store - * have more updates than its corresponding data store. Performing history store cleanup at the - * end can able to remove any such unstable updates that are written to the history store. - * - * Do not perform the final pass on the history store in an in-memory configuration as it - * doesn't exist. - */ - if (!F_ISSET(S2C(session), WT_CONN_IN_MEMORY)) + if (F_ISSET(S2C(session), WT_CONN_RECOVERING)) WT_ERR(__rollback_to_stable_hs_final_pass(session, rollback_timestamp)); err: diff --git a/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-9792 b/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-9792 deleted file mode 100644 index 4889602e518..00000000000 --- a/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-9792 +++ /dev/null @@ -1,160 +0,0 @@ -############################################ -# RUN PARAMETERS: V3 -############################################ -assert.read_timestamp=0 -backup=1 -backup.incremental=off -backup.incr_granularity=11461 -block_cache=0 -block_cache.cache_on_checkpoint=0 -block_cache.cache_on_writes=0 -block_cache.size=47 -btree.huffman_value=0 -cache=612 -cache.evict_max=1 -cache.minimum=20 -checkpoint=on -checkpoint.log_size=167 -checkpoint.wait=32 -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=0 -format.major_timeout=0 -import=0 -logging=0 -logging.compression=none -logging.file_max=199668 -logging.prealloc=0 -logging.remove=0 -ops.alter=0 -ops.compaction=1 -ops.hs_cursor=1 -ops.prepare=0 -ops.random_cursor=0 -ops.salvage=0 -ops.verify=1 -quiet=1 -runs.in_memory=0 -runs.ops=0 -runs.rows=1000000 -runs.tables=3 -runs.threads=16 -runs.timer=6 -runs.verify_failure_dump=0 -statistics=0 -statistics.server=0 -stress.aggressive_sweep=0 -stress.checkpoint=0 -stress.checkpoint_evict_page=0 -stress.checkpoint_reserved_txnid_delay=0 -stress.checkpoint_prepare=0 -stress.evict_reposition=1 -stress.failpoint_eviction_fail_after_reconciliation=0 -stress.failpoint_hs_delete_key_from_ts=0 -stress.hs_checkpoint_delay=0 -stress.hs_search=0 -stress.hs_sweep=0 -stress.split_1=0 -stress.split_2=1 -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.config=off -wiredtiger.rwlock=1 -wiredtiger.leak_memory=0 -############################################ -# TABLE PARAMETERS: table 1 -############################################ -table1.btree.compression=snappy -table1.btree.dictionary=0 -table1.btree.internal_key_truncation=1 -table1.btree.internal_page_max=15 -table1.btree.key_max=24 -table1.btree.key_min=14 -table1.btree.leaf_page_max=11 -table1.btree.memory_page_max=8 -table1.btree.prefix_len=0 -table1.btree.prefix_compression=0 -table1.btree.prefix_compression_min=7 -table1.btree.reverse=0 -table1.btree.split_pct=94 -table1.btree.value_max=1513 -table1.btree.value_min=1 -table1.disk.checksum=unencrypted -table1.disk.firstfit=0 -table1.ops.pct.delete=3 -table1.ops.pct.insert=63 -table1.ops.pct.modify=3 -table1.ops.pct.read=9 -table1.ops.pct.write=22 -table1.ops.truncate=1 -table1.runs.mirror=0 -table1.runs.source=file -table1.runs.type=row-store -############################################ -# TABLE PARAMETERS: table 2 -############################################ -table2.btree.compression=zlib -table2.btree.dictionary=0 -table2.btree.internal_key_truncation=1 -table2.btree.internal_page_max=12 -table2.btree.key_max=115 -table2.btree.key_min=22 -table2.btree.leaf_page_max=12 -table2.btree.memory_page_max=9 -table2.btree.prefix_len=0 -table2.btree.prefix_compression=1 -table2.btree.prefix_compression_min=7 -table2.btree.reverse=0 -table2.btree.split_pct=86 -table2.btree.value_max=37 -table2.btree.value_min=16 -table2.disk.checksum=on -table2.disk.firstfit=1 -table2.ops.pct.delete=12 -table2.ops.pct.insert=0 -table2.ops.pct.modify=2 -table2.ops.pct.read=60 -table2.ops.pct.write=26 -table2.ops.truncate=1 -table2.runs.mirror=0 -table2.runs.source=table -table2.runs.type=row-store -############################################ -# TABLE PARAMETERS: table 3 -############################################ -table3.btree.compression=zstd -table3.btree.dictionary=0 -table3.btree.internal_key_truncation=1 -table3.btree.internal_page_max=11 -table3.btree.key_max=68 -table3.btree.key_min=21 -table3.btree.leaf_page_max=13 -table3.btree.memory_page_max=1 -table3.btree.prefix_len=41 -table3.btree.prefix_compression=1 -table3.btree.prefix_compression_min=2 -table3.btree.reverse=0 -table3.btree.split_pct=86 -table3.btree.value_max=239 -table3.btree.value_min=9 -table3.disk.checksum=unencrypted -table3.disk.firstfit=0 -table3.ops.pct.delete=50 -table3.ops.pct.insert=2 -table3.ops.pct.modify=1 -table3.ops.pct.read=3 -table3.ops.pct.write=44 -table3.ops.truncate=1 -table3.runs.mirror=0 -table3.runs.source=table -table3.runs.type=row-store - -- cgit v1.2.1