-
Type:
Engineering Test
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Storage Execution
-
Fully Compatible
-
Storage Execution 2026-06-22, Storage Execution 2026-07-06
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Summary
SERVER-126448 introduced storage-engine-agnostic test helpers enableWriteConflictForWrites
and enableWriteConflictForReads which deterministically inject a WriteConflictException
into a WiredTiger write (WT_OP_CHECK) or read/seek (WT_READ_CHECK). This ticket tracks
extending enableWriteConflictForWrites to other write-path subsystems that rely on
write-conflict retry/rollback but are pinned today only by slow integration/concurrency jstests.
Motivation
- Much WCE retry/safety behavior on the write path is covered only by jstests
(profile_write_conflict.js, partial_unique_indexes.js, apply_ops_insert_write_conflict.js,
collMod_writeconflict.js, reindex_writeconflict.js). Unit coverage would be faster,
deterministic, and pin behavior at the source.
Candidate areas (non-index-build)
- Core CRUD writes – collection_write_path.cpp. collection_write_path_test.cpp already
runs on real WiredTiger but injects no WCE. Add tests that fire a WCE during
insertDocuments/updateDocument/deleteDocument/truncate/truncateRange and assert
op-observer, pre-image, and index side effects roll back and a retry succeeds. With a secondary
index present this also exercises wiredtiger_index.cpp WT_OP_CHECK. - Fast-count / SizeStorer – WCE during wiredtiger_size_storer.cpp flush keeps record counts
correct after rollback and a retry succeeds. - Timeseries write path – WCE during timeseries_write_ops_internal.cpp reverts bucket-catalog
state.
Caveats
- The fail point is process-global, so tests must arm it narrowly around the operation under test
(see container_based_spiller_test.cpp for the pattern).
- is related to
-
SERVER-126328 Have a storage engine-agnostic way to turn on write conflict fail points in unit tests
-
- Closed
-
-
SERVER-126448 Figure out why SERVER-126328 cannot be used in CatalogTestFixture-based tests
-
- Closed
-