[SERVER-31741] WriteConcern - 'majority' should not count aribiters Created: 26/Oct/17 Updated: 27/Oct/23 Resolved: 26/Oct/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Write Ops |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Dharshan Rangegowda | Assignee: | Unassigned |
| Resolution: | Works as Designed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Operating System: | ALL |
| Participants: |
| Description |
|
I have a 5 node replica set with 3 data nodes and 2 arbiters. Writes are configured with a writeconcern='Majority'. So the expected number of writers is 3. So if any one data node is node the writes don't work. Shouldn't 'WriteConcern' look at the type of the node and decide? So it should consider the 'Majority' of nodes that can actually accept writes. E.g. If 1 data down is down that leaves 2 data nodes + 2 arbiters. We should still be able to write with 'Majority' writeConcern. |
| Comments |
| Comment by Bruce Zu [ 13/Aug/18 ] |
|
Hi Andy, As arbiter only votes and does not keep data, May I know why still take the arbiter in calculating majority? what will happen if we do not count arbiters? would not it make the replset described by Dharshan more robust? Thank you Bruce |
| Comment by Andy Schwerin [ 26/Oct/17 ] |
|
It is not safe for a node to locally change the definition of majority based on its belief about what nodes are up. It is also a requirement of the consensus protocol that writes be confirmed by a majority of voting nodes to ensure they do not roll back. Since arbiters vote but do not receive writes, this behavior is as designed. |