-
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
Apply the primary's own oplog entries for opted-in writes using the existing OplogApplier machinery, and adjust write acknowledgment and read timestamp selection so read-your-writes behavior is preserved.
Scope of Work
- Run the batch OplogApplier on the primary, tailing from lastApplied; skip entries for non-opted-in writes (already applied).
- Separate lastWritten (oplog committed) from lastApplied (applied by the primary applier).
- Write concern (including w:1) waits for the primary's lastApplied to reach the write's optime.
- Read timestamps on the primary, including transaction snapshots and the detector read timestamp, are at or below lastApplied.
- Read-your-writes jstests.
Acceptance Criteria
- Opted-in writes are applied on the primary and are visible to subsequent reads after acknowledgment.
- Findings recorded on this ticket, including an audit list of every consumer of lastApplied on the primary (snapshot manager, stable timestamp, heartbeats, causal consistency, etc.).
Technical Notes
- Prototype quality; not intended for commit to master.
Design Note Alignment
- The primary applier runs under UnreplicatedWritesBlock, so its writes go through to WiredTiger rather than being staged, consistent with design note section 2.3.
- Design reference: src/mongo/db/txns/staged_writes_design.md (PR #66680).
- depends on
-
SERVER-138762 Remove apply-at-commit so only the oplog entry commits on the primary
-
- Backlog
-
- is depended on by
-
SERVER-138771 Identify candidate workloads and tentative performance goals for conflict detection
-
- Open
-
-
SERVER-138768 Prototype startup recovery and failover with staged writes and primary application
-
- Backlog
-
-
SERVER-138769 Analyze attached vs. disaggregated storage differences for conflict detection write path
-
- Backlog
-
-
SERVER-138772 Produce delivery plan and architecture update from conflict detection prototype findings
-
- Backlog
-