[SERVER-46186] Single voter replica set primaries must wait for the truncate point for {j:true} write concern Created: 14/Feb/20  Updated: 29/Oct/23  Resolved: 27/Feb/20

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: 4.3.4

Type: Task Priority: Major - P3
Reporter: Dianna Hohensee (Inactive) Assignee: Dianna Hohensee (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-44555 Implement replicate before journaling Closed
Problem/Incident
Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2020-02-24, Execution Team 2020-03-09
Participants:
Linked BF Score: 0

 Description   

Single voter replica set primaries must wait for the truncate point for {j:true} write concern to ensure user confirmed writes are not lost on recovery after a crash.

Now that primaries will write the oplogTruncateAfterPoint, we must be careful not to truncate writes that were confirmed to the user as persisted, which should be safe across a server crash.

We only want to do this for single voter replica sets, because multi-node multi-voter replica sets are likely to lose {w: 1, j: true} writes anyway after a primary crash due to rollback: they are inherently unsafe already.
Single voter mutli-node replica sets must use the truncate point on startup for cross replica set data consistency. Single voter single node replica sets are doing it for simplicity, not to make startup behavior complicated regarding the truncate point, and avoid breaking downstream dependencies.



 Comments   
Comment by Githook User [ 27/Feb/20 ]

Author:

{'name': 'Dianna Hohensee', 'username': 'DiannaHohensee', 'email': 'dianna.hohensee@mongodb.com'}

Message: SERVER-46186 Single voter replica set primaries for

{j: true}

writeConcern writes will wait for earlier writes to become visible before flushing the journal to disk to ensure user confirmed writes are never truncated during recovery after a crash.
Branch: master
https://github.com/mongodb/mongo/commit/454b3e9f8418bb9b0134869af582a0518aad5e12

Generated at Thu Feb 08 05:10:45 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.