[SERVER-76336] Default index build commit quorum to "majority" Created: 20/Apr/23  Updated: 28/Jul/23

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

Type: Improvement Priority: Major - P3
Reporter: Josef Ahmad Assignee: Backlog - Storage Execution Team
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Assigned Teams:
Storage Execution
Participants:
Case:

 Description   

The commit quorum currently defaults to "votingMembers". This ticket is to evaluate changing the default to "majority", which is more in line with the default write concern.

Some applications depend on being able to build an index while a member of the replica set is undergoing maintenance. A "votingMember" quorum would be too stringent in this case, as it would stall the index build until the replica completes maintenance.
Off the top of my head, I'm not aware of a reason why we should allow writes to complete but not index builds in this scenario.

Although I haven't verified it, I also suspect that the "votingMember" commit quorum can result in additional delays when building an index if a delayed replica set member is present.

cc: irwin.dolobowsky@mongodb.com



 Comments   
Comment by Irwin Dolobowsky [ 28/Jul/23 ]

Spoke with Josef.  We believe the best path would be to add an option for this and leave the default as is.  We'd also need to provide guidance on the implications of changing the setting.  Should do more investigation before exposing the option.

Comment by Irwin Dolobowsky [ 26/Apr/23 ]

Ah, so its a majority of voting members. That makes sense, thanks!

Comment by Sheila Doyle [ 25/Apr/23 ]

irwin.dolobowsky@mongodb.com

Majority is always less than voting nodes (unless replica set is just 1 node) and can be calculated using this formula:

min( floor(votingNodes/2) + 1 , votingNodes - arbiters)

Comment by Irwin Dolobowsky [ 25/Apr/23 ]

What is the difference between "votingmembers" and "majority" in terms of quorum?  Does this mean that you can have members of the replica set that are not voting members?

Comment by Louis Williams [ 21/Apr/23 ]

Also should consider exposing a server parameter to change the default.

Comment by Yujin Kang Park [ 20/Apr/23 ]

We should consider that index builds are only resumable when the commit quorum is the default voting members. Not sure if this is something that we could somehow fix, haven't looked much into it.

https://github.com/10gen/mongo/blob/137661d326c6108c0b271a0b8be167ae3fbfea03/src/mongo/db/index_builds_coordinator.cpp#L429-L437

And the ticket which introduced this limitation: SERVER-50519

Comment by Eric Milkie [ 20/Apr/23 ]

Keep in mind this only affects index builds on nonempty collections. Arguably, running automated index builds on non-empty collections without manual control isn't such a great idea. Changing this global default for everyone to accommodate these users doesn't sound like a fair trade, since the alternative proposed in this ticket is to introduce possibly crippling replication delays to some number of nodes less than the majority.

Generated at Thu Feb 08 06:32:26 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.