[SERVER-45667] Single node replica sets should not use the oplogTruncateAfterPoint on startup recovery Created: 21/Jan/20  Updated: 10/Feb/20  Resolved: 10/Feb/20

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

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

Issue Links:
Related
related to SERVER-44555 Implement replicate before journaling Closed
is related to SERVER-45668 Stop writing the oplogTruncateAfterPo... Closed
Sprint: Execution Team 2020-01-27, Execution Team 2020-02-10, Execution Team 2020-02-24
Participants:

 Description   

There is no need for a single node replica set to truncate oplog holes on startup because they cannot have oplog holes. A single node replica set member is always primary, so batch application behavior is irrelevant. The Replicate Before Journaling project will add primary mode behavior around tracking oplog holes, but again, since there are no nodes replicating from the node, parallel writes on the primary can never become out of sync with secondary nodes.

This is prep work before the Replicate Before Journaling functional changes go in, to break up the changes.

Notes:
replCoord->getConfig().getNumMembers() should get the number of replica set members
replSetReconfig makes it hard to correctly control when to write or not write the truncate point as primary. Not writing the truncate point as a 1-node-replset primary appears to have better performance, but will be attempted at a later time.



 Comments   
Comment by Dianna Hohensee (Inactive) [ 10/Feb/20 ]

We've decided against this change. We will instead wait for the truncate point, prior to waiting for persistence, for

{w:1, j:true}

writes on single voter replica sets.

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