[DRIVERS-966] 'CommitQuorum' option support for 'createIndexes’ command on MongoDB 4.4 Created: 17/Mar/20  Updated: 21/Feb/23  Resolved: 21/Feb/23

Status: Closed
Project: Drivers
Component/s: None
Fix Version/s: None

Type: Epic Priority: Major - P3
Reporter: Esha Bhargava Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on CXX-1998 'CommitQuorum' option support for 'cr... Closed
depends on PHPLIB-544 Support commitQuorum option for creat... Closed
depends on CDRIVER-3627 'CommitQuorum' option support for 'cr... Closed
depends on CSHARP-3064 'CommitQuorum' option support for 'cr... Closed
depends on GODRIVER-1582 'CommitQuorum' option support for 'cr... Closed
depends on JAVA-3701 'CommitQuorum' option support for 'cr... Closed
depends on MOTOR-524 'CommitQuorum' option support for 'cr... Closed
depends on NODE-2569 'CommitQuorum' option support for 'cr... Closed
depends on PYTHON-2186 'CommitQuorum' option support for 'cr... Closed
depends on RUBY-2221 'CommitQuorum' option support for 'cr... Closed
depends on RUST-382 'CommitQuorum' option support for 'cr... Closed
Driver Changes: Not Needed
Cost Threshold %: 100
Driver Compliance:
Key Status/Resolution FixVersion
MOTOR-524 Works as Designed
PYTHON-2186 Fixed 3.11
CDRIVER-3627 Won't Do
CXX-1998 Fixed 3.6.0-rc0, 3.6.0
CSHARP-3064 Fixed 2.11.0
GODRIVER-1582 Fixed 1.4.0
JAVA-3701 Fixed 4.1.0
NODE-2569 Fixed 3.6.0
PHPLIB-544 Fixed 1.7.0-beta2, 1.7.0
RUBY-2221 Fixed 2.13.0.beta1
RUST-382 Duplicate
SWIFT-807 Won't Do

 Description   
Epic Summary

 

Summary

Execution team has introduced a new option named ‘commitQuorum’ to ‘createIndexes’ command as part of PM-253 (Two phase commit for index build). ‘commitQuorum’ is very similar to writeConcern options which can accept an integer or a string - “majority”and custom write concern option. In addition to those values, the new ‘commitQuorum’ option will also accept “votingMembers” string value. A primary node that coordinates an index build can’t complete an index build until it has received votes from secondaries stating that they have each finished collection scanning and draining phase for that index build. The number of votes the primary has to wait before committing an index depends on the commitQuorum option’s value. The primary is also eligible to vote and it will vote for itself.

The main purpose of this new ‘commitQuorum’ option is to prevent slow secondaries replication from getting blocked on applying ‘commitIndexBuild’ oplog entry waiting for the index build completion on that secondary.

The current default value for the ‘commitQuorum’ option in 4.4 RC0 is “majority”, i.e., majority of voting data bearing nodes. Currently, some implementation issues with initial sync and abort index build logic have prevented us from making the default value for ‘commitQuorum’ as ‘votingMembers’, i.e., all voting data bearing nodes. For MongoDB 4.4 GA, the default value for ‘commitQuorum’ will be ‘votingMembers’ and we are working towards making the default value change (SERVER-46823).

For a quick reference, if a user wants to create an index ‘x_1’ on foo.bar collection with a commit quorum value as “votingMembers”, then the shell syntax will be:

>> db.runCommand(
{createIndexes: “bar”,
indexes: [{name: "x_1", key: {x: 1}}],
commitQuorum: "votingMembers"});

Say, if it’s a 3 node replica set (PSA), then the primary index build will wait for 2 votes (PS) to commit the index build. 



 Comments   
Comment by Divjot Arora (Inactive) [ 23/Apr/20 ]

If anyone wants to link to the official docs for this in their driver documentation, this link should work: dochub.mongodb.org/core/index-commit-quorum. CC ravind.kumar

Comment by Patrick Freed [ 16/Apr/20 ]

Support for this option requires driver side wire version checks, so drivers that just pass options along via dictionaries or keyword arguments are not automatically compliant.

Generated at Thu Feb 08 08:22:41 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.