diff options
author | Luke Chen <luke.chen@mongodb.com> | 2023-04-03 11:26:29 +1000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-04-03 01:41:52 +0000 |
commit | 867bd2a507ddc5f54d59220f8c977836e0f0d8d1 (patch) | |
tree | e68973150fc4f8b873a8ee41df199993edf375d9 | |
parent | 24882ea2f9ba924f2a3db7bcb003ccaabe2a365a (diff) | |
download | mongo-867bd2a507ddc5f54d59220f8c977836e0f0d8d1.tar.gz |
Import wiredtiger: 8380156d01dc67c73ce83aa1afe01d60ad3f59a2 from branch mongodb-4.4
ref: f64b6332b7..8380156d01
for: 4.4.20
WT-9792 Fix RTS to remove globally visible update of the data store update from the history store
3 files changed, 114 insertions, 3 deletions
diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data index d6405dadb6c..7adb06847ad 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.4", - "commit": "f64b6332b7a55980e6ed765fdb440b567ea8ddbd" + "commit": "8380156d01dc67c73ce83aa1afe01d60ad3f59a2" } 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 042bdadbbd2..50aa4c7ab1c 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 @@ -51,12 +51,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..86edd81479b --- /dev/null +++ b/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-9792 @@ -0,0 +1,101 @@ +############################################ +# 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 +############################################ +btree.compression=snappy +btree.dictionary=0 +btree.internal_key_truncation=1 +btree.internal_page_max=15 +btree.key_max=24 +btree.key_min=14 +btree.leaf_page_max=11 +btree.memory_page_max=8 +btree.prefix_len=0 +btree.prefix_compression=0 +btree.prefix_compression_min=7 +btree.reverse=0 +btree.split_pct=94 +btree.value_max=1513 +btree.value_min=1 +disk.checksum=unencrypted +disk.firstfit=0 +ops.pct.delete=3 +ops.pct.insert=63 +ops.pct.modify=3 +ops.pct.read=9 +ops.pct.write=22 +ops.truncate=1 +runs.mirror=0 +runs.source=file +runs.type=row-store |