[SERVER-14403] Change w:majority write concern to indicate a majority of voting nodes Created: 01/Jul/14 Updated: 11/Jul/16 Resolved: 21/Oct/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | None |
| Fix Version/s: | 2.7.8 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Andy Schwerin | Assignee: | Matt Dannenberg |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||||||
| Description |
|
In systems with non-voting nodes, confirmed w:majority writes might in some circumstances still roll back. This is because rollback is precluded by ensuring that a majority of voting nodes are aware of the write, but w:majority in a system with a high ratio of non-voting to voting nodes might not ensure this. Conversely, on clusters with a high non-voting to voting ratio, w:majority is really too strong a requirement for committedness. Only the majority of the voting nodes need to respond, to be safe from rollback. The work of this ticket is to change the meaning of "w:majority" to indicate acceptance of a write from the majority of voting nodes. No built-in write concern will provide the old functionality. |
| Comments |
| Comment by Andy Schwerin [ 01/Dec/14 ] |
|
To satisfy a "majority" write concern in a typical cluster configuration, a write must propagate to more than half of the voting nodes. Since writes propagate to data-bearing nodes, but never propagate to arbiters, there is an exception to this rule. If the number of voting nodes that are data bearing is not more than half of the total number of voting nodes, then "majority" write concern is satisfied when a write propagates to all data-bearing, voting nodes. It should be noted that this exception is only safe if the number of arbiters is at most half of the total number of voting nodes, or if all non-voting nodes are also unelectable. This is among the several reasons why systems with more than 1 arbiter are strongly discouraged. If v is the number of voting nodes, and a is the number of voting nodes that are arbiters, this is summarized as follows:
|
| Comment by Githook User [ 20/Oct/14 ] |
|
Author: {u'username': u'milkie', u'name': u'Eric Milkie', u'email': u'milkie@10gen.com'}Message: |