diff options
3 files changed, 173 insertions, 3 deletions
diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data index 2e867821f19..855eba155bd 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": "149c294a2b2be36c7755fa5be53881e667d0c14c" + "commit": "f36a8e9d80dde82ceb11805e6437e12a2d784ae6" } 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 d775b8d8128..d3c2adc3596 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,12 +55,22 @@ __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); - if (hs_tw->start_ts < ts) + + /* + * 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) break; WT_ERR(hs_cursor->remove(hs_cursor)); WT_STAT_CONN_DATA_INCR(session, txn_rts_hs_removed); - if (hs_tw->start_ts == ts) + + /* + * 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) WT_STAT_CONN_DATA_INCR(session, cache_hs_key_truncate_rts); else WT_STAT_CONN_DATA_INCR(session, cache_hs_key_truncate_rts_unstable); 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 new file mode 100644 index 00000000000..4889602e518 --- /dev/null +++ b/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-9792 @@ -0,0 +1,160 @@ +############################################ +# 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 + |