-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Storage Execution
-
Storage Execution 2026-11-23
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Overview
Prototype the merged cursor that presents a WiredTiger table as the union of its committed contents (at the transaction's snapshot) and the RecoveryUnit's staged entries for that table. The cursor is opaque to key and value contents; RecordStore, SortedDataInterface and container code above it is unchanged.
Scope of Work
- Semantics per design note section 6.1: exact search, next/prev two-way merge with staged entries winning and tombstones hiding table entries, positioning searches, bounds applied to both sides, reset, get_key/get_value holding ConstSharedBuffer references.
- Table-only operations: largest_key, random cursors, statistics.
- Choose and implement an interposition approach: WT_CURSOR-compatible shim vs. C++ cursor class (open question 4). Unsupported operations must fail loudly.
- Confirm key/value capture from the write helpers works for every key format used (open question 5).
- Unit tests for merge semantics, including bounds and reverse iteration.
Acceptance Criteria
- Merged cursor in the project branch with passing unit tests.
- Findings recorded on this ticket: interposition choice and rationale, unsupported operations.
- Acceptance bar: the full jstest suite passes with featureFlagStagedWrites enabled, except for specific tests excluded with a documented reason tied to prototype scope.
Technical Notes
- Prototype quality; not intended for commit to master.
- Design reference: src/mongo/db/txns/staged_writes_design.md (PR #66680).
- depends on
-
SERVER-138761 Prototype StagedWriteBuffer and staging hooks in the WiredTiger write helpers
-
- Open
-
- is depended on by
-
SERVER-138764 Validate read-your-writes across RecordStore, SortedDataInterface and Container with staged writes
-
- Backlog
-
-
SERVER-138772 Produce delivery plan and architecture update from conflict detection prototype findings
-
- Backlog
-