[SERVER-22287] Merging replica sets with replication protocol version 1 may result in two primaries Created: 25/Jan/16 Updated: 25/Jan/17 Resolved: 10/Feb/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | 3.2.1 |
| Fix Version/s: | 3.2.4, 3.3.2 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Kevin Adistambha | Assignee: | Benety Goh |
| Resolution: | Done | Votes: | 0 |
| Labels: | code-and-test | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||||||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Backport Completed: | |||||||||||||||||
| Steps To Reproduce: | 1. Create a replica set with at least two members, using rs.initiate(). Note: two_primaries.js jstest is attached. |
||||||||||||||||
| Sprint: | Repl F (01/29/16), Repl 10 (02/19/16) | ||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
In replication protocol version 1, it is possible to create a replica set with two primaries by creating two replica sets with the same name and adding the primary of one set to the other set. Any write to the set at this state was done to one of the primaries. However, attempt to restart the set may show data corruption error. Error message is:
This issue does not happen with protocol version 0. |
| Comments |
| Comment by Githook User [ 18/Feb/16 ] |
|
Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}Message: (cherry picked from commit 0bc96b1ede73c82d45b6d6c2e0b9a33e613ca7c3) |
| Comment by Githook User [ 18/Feb/16 ] |
|
Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}Message: This field is generated when a replica set configuration is created from the replSetInitiate command (cherry picked from commit 1ecf7de7e18df42c154c04b1d9310956c91a75b7) |
| Comment by Githook User [ 18/Feb/16 ] |
|
Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}Message: (cherry picked from commit c58239c96ee83dab5232084cb69238de2b093c49) |
| Comment by Githook User [ 08/Feb/16 ] |
|
Author: {u'username': u'dannenberg', u'name': u'Matt Dannenberg', u'email': u'matt.dannenberg@10gen.com'}Message: Make clear that rs.initiate() should not be run against multiple nodes Users have always been confused about rs.initiate() and have been known to run it against each node of a replica set. When they then go to rs.add() the other members to one node, sad things happen. These sad things are much sadder in 3.2, so we should do everything we can to help them avoid this. See https://jira.mongodb.org/browse/SERVER-22287 for more about the 3.2 sad things. Signed-off-by: kay <kay.kim@10gen.com> |
| Comment by Githook User [ 08/Feb/16 ] |
|
Author: {u'username': u'dannenberg', u'name': u'Matt Dannenberg', u'email': u'matt.dannenberg@10gen.com'}Message: Make clear that rs.initiate() should not be run against multiple nodes Users have always been confused about rs.initiate() and have been known to run it against each node of a replica set. When they then go to rs.add() the other members to one node, sad things happen. These sad things are much sadder in 3.2, so we should do everything we can to help them avoid this. See https://jira.mongodb.org/browse/SERVER-22287 for more about the 3.2 sad things. Signed-off-by: kay <kay.kim@10gen.com> |
| Comment by Githook User [ 08/Feb/16 ] |
|
Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}Message: |
| Comment by Githook User [ 05/Feb/16 ] |
|
Author: {u'username': u'scotthernandez', u'name': u'Scott Hernandez', u'email': u'scotthernandez@gmail.com'}Message: |
| Comment by Githook User [ 05/Feb/16 ] |
|
Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}Message: |
| Comment by Githook User [ 05/Feb/16 ] |
|
Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}Message: |
| Comment by Githook User [ 05/Feb/16 ] |
|
Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}Message: |
| Comment by Githook User [ 05/Feb/16 ] |
|
Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}Message: This field is generated when a replica set configuration is created from the replSetInitiate command |
| Comment by Eric Milkie [ 25/Jan/16 ] |
|
I suspect that depending on config version (and term, in pv1), you can make both pv0 and pv1 replica sets merge in this way. |