[SERVER-19537] Allow replSetInitiate on nodes not started with --replSet Created: 23/Jul/15 Updated: 25/Jan/17 Resolved: 08/Aug/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | None |
| Fix Version/s: | 3.1.7 |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Andy Schwerin | Assignee: | Benety Goh |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||||||
| Sprint: | RPL 7 08/10/15, RPL 8 08/31/15 | ||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||
| Description |
|
If a node is started without --replSet, and it has neither an oplog nor a local replica set config document, the operator should be able to run replSetInitiate to create a single-node replica set configuration and to prime the oplog. Then, on restart if the operator adds --replSet to the startup configuration directives, the node can immediately transition into PRIMARY rather than waiting in STARTUP for the operator to run replSetInitiate. This should only be allowed for single-node replica set configurations. |
| Comments |
| Comment by Githook User [ 08/Aug/15 ] | |
|
Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}Message: | |
| Comment by Githook User [ 08/Aug/15 ] | |
|
Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}Message: | |
| Comment by Githook User [ 08/Aug/15 ] | |
|
Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}Message: | |
| Comment by Githook User [ 08/Aug/15 ] | |
|
Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}Message: | |
| Comment by Githook User [ 08/Aug/15 ] | |
|
Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}Message: This supports creating the oplog collection and appending oplog entries when replication is disabled. | |
| Comment by Githook User [ 08/Aug/15 ] | |
|
Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}Message: | |
| Comment by Kevin Pulo [ 24/Jul/15 ] | |
|
Given that initiate normally adds a
entry to the oplog, I think maybe we need to prime the oplog here? | |
| Comment by Scott Hernandez (Inactive) [ 23/Jul/15 ] | |
|
We may also want to ensure that the config contains a single voting+electable member which is the node running the command – members.size() == 1 && member[0] is self and non-prio-0 with a vote. | |
| Comment by Eric Milkie [ 23/Jul/15 ] | |
|
Mini-spec:
The goal is to leave the node in such a state that when you restart the process with --replSet, it loads the stored config and immediately proceeds regular replica set startup and eventually ends up in PRIMARY state with no further user interaction. |