diff options
author | Luke Chen <luke.chen@mongodb.com> | 2022-12-19 18:08:41 +1100 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-12-19 07:28:46 +0000 |
commit | 715be2d1a59b914f5902b1cf0daad0dcbaf2154e (patch) | |
tree | 8fef0feba582da0dde2c6ae9194aab72770e414a | |
parent | ca6b6dc8eb0a0bd527f812f4fb1196794ccd1a83 (diff) | |
download | mongo-715be2d1a59b914f5902b1cf0daad0dcbaf2154e.tar.gz |
Import wiredtiger: b4da1f016dc9e7f83f85f0b5622848a3cc77143a from branch mongodb-4.4
ref: 57a7e6bd1c..b4da1f016d
for: 4.4.19
WT-8234 Prevent eviction of internal pages while reconciling leaf pages which could refer to their memory.
-rw-r--r-- | src/third_party/wiredtiger/import.data | 2 | ||||
-rw-r--r-- | src/third_party/wiredtiger/src/reconcile/rec_write.c | 7 | ||||
-rw-r--r-- | src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-8234 | 100 |
3 files changed, 107 insertions, 2 deletions
diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data index a8ba3d464bd..20ffbbe421e 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": "57a7e6bd1c6549a763f9a9bce6ce37dd9df91e67" + "commit": "b4da1f016dc9e7f83f85f0b5622848a3cc77143a" } diff --git a/src/third_party/wiredtiger/src/reconcile/rec_write.c b/src/third_party/wiredtiger/src/reconcile/rec_write.c index 60d2e51da83..efdb2b6259c 100644 --- a/src/third_party/wiredtiger/src/reconcile/rec_write.c +++ b/src/third_party/wiredtiger/src/reconcile/rec_write.c @@ -191,7 +191,12 @@ __reconcile(WT_SESSION_IMPL *session, WT_REF *ref, WT_SALVAGE_COOKIE *salvage, u WT_WITH_PAGE_INDEX(session, ret = __wt_rec_row_int(session, r, page)); break; case WT_PAGE_ROW_LEAF: - ret = __wt_rec_row_leaf(session, r, ref, salvage); + /* + * It's important we wrap this call in a page index guard, the ikey on the ref may still be + * pointing into the internal page's memory. We want to prevent eviction of the internal + * page for the duration. + */ + WT_WITH_PAGE_INDEX(session, ret = __wt_rec_row_leaf(session, r, ref, salvage)); break; default: ret = __wt_illegal_value(session, page->type); diff --git a/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-8234 b/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-8234 new file mode 100644 index 00000000000..aecb8d62fe2 --- /dev/null +++ b/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-8234 @@ -0,0 +1,100 @@ +############################################ +# RUN PARAMETERS: V2 +############################################ +assert.read_timestamp=0 +assert.write_timestamp=0 +backup=0 +backup.incremental=off +backup.incr_granularity=9466 +btree.bitcnt=2 +btree.compression=none +btree.dictionary=0 +btree.huffman_value=0 +btree.internal_key_truncation=1 +btree.internal_page_max=16 +btree.key_max=34 +btree.key_min=27 +btree.leaf_page_max=15 +btree.memory_page_max=1 +btree.prefix_compression=1 +btree.prefix_compression_min=5 +btree.repeat_data_pct=10 +btree.reverse=0 +btree.split_pct=89 +btree.value_max=1228 +btree.value_min=14 +cache=20 +cache.evict_max=3 +cache.minimum=20 +checkpoint=on +checkpoint.log_size=65 +checkpoint.wait=66 +disk.checksum=off +disk.data_extend=0 +disk.direct_io=1 +disk.encryption=none +disk.firstfit=0 +disk.mmap=1 +disk.mmap_all=0 +format.abort=0 +format.independent_thread_rng=1 +format.major_timeout=0 +import=0 +logging=0 +logging.archive=0 +logging.compression=none +logging.file_max=79269 +logging.prealloc=0 +lsm.auto_throttle=1 +lsm.bloom=1 +lsm.bloom_bit_count=20 +lsm.bloom_hash_count=6 +lsm.bloom_oldest=0 +lsm.chunk_size=7 +lsm.merge_max=11 +lsm.worker_threads=4 +ops.alter=0 +ops.compaction=0 +ops.hs_cursor=0 +ops.pct.delete=5 +ops.pct.insert=1 +ops.pct.modify=51 +ops.pct.read=43 +ops.pct.write=0 +ops.prepare=0 +ops.random_cursor=0 +ops.salvage=0 +ops.truncate=1 +ops.verify=1 +quiet=1 +runs.in_memory=0 +runs.ops=0 +runs.rows=2600000 +runs.source=table +runs.threads=4 +runs.timer=11 +runs.type=row-store +runs.verify_failure_dump=0 +statistics=0 +statistics.server=0 +stress.aggressive_sweep=0 +stress.checkpoint=0 +stress.checkpoint_reserved_txnid_delay=0 +stress.checkpoint_prepare=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=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.config= +wiredtiger.rwlock=1 +wiredtiger.leak_memory=0 +############################################ |