[SERVER-14234] Majority mode for oplog tailable cursor Created: 11/Jun/14  Updated: 06/Dec/22  Resolved: 21/Apr/16

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

Type: Improvement Priority: Minor - P4
Reporter: Jared Rosoff Assignee: Backlog - Replication Team
Resolution: Done Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Replication
Backwards Compatibility: Fully Compatible
Participants:

 Description   

When systems like mongo-connector tail the oplog, it would be useful to be able to have the cursor tail the watermark reflecting the majority of the cluster, rather than the latest operation in the current nodes oplog. Thus the cursor would only return an oplog entry to the caller once a majority of replicas had processed the oplog entry. This would mean that rollbacks would only need to be handled by the app in the case of catastrophic failures where more than a majority of the cluster was lost rather than on every failover that happens.



 Comments   
Comment by Eric Milkie [ 21/Apr/16 ]

readConcern level majority was released in version 3.2.

Comment by Henrik Ingo (Inactive) [ 06/Aug/14 ]

In other words, you're asking for a "ReadConcern" of w:majority, when tailing the oplog.

Note that the Raft protocol includes the state variable commitIndex, which is the position of the last operation received by a majority of nodes. (A Raft commit therefore is essentially a MongoDB w:majority commit.) Hence, implementing this ticket would be straightforward with a Raft like replication algorithm.

Generated at Thu Feb 08 03:34:14 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.