[SERVER-18128] Replica set secondary allows rs.initiate() while performing initial sync Created: 20/Apr/15 Updated: 20/Apr/15 Resolved: 20/Apr/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | 2.4.11, 2.6.8, 3.0.1 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Eric Sommer | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||
| Issue Links: |
|
||||
| Operating System: | ALL | ||||
| Steps To Reproduce: | See above. |
||||
| Participants: | |||||
| Description |
|
Scenario: Create RS with two data nodes (A,B) and an arbiter.
The idea is to make initial sync take some time. Start A process as follows:
This will start A, which will come up and start initial sync. rs.initiate() command will run while initial sync is taking place. Command should fail, but it will succeed.
Command doesn’t succeed if:
See attached log mongodb.debug.log from node A. Customer found bug in 2.4.11. Tested with 3.0.1 and 2.6.8 – same behavior. |
| Comments |
| Comment by Eric Milkie [ 20/Apr/15 ] |
|
There is no way to know, because at startup the node has no config, so whatever tells it the config first is what wins. |
| Comment by Eric Sommer [ 20/Apr/15 ] |
|
I was only differentiating between before and after it went into SECONDARY state. I was referring to before-SECONDARY as "during initial sync". But I see what you're saying. So this did occur during that period you describe "where the node has no configuration and will thus respond to initiate requests." Does that mean there's no way to prevent a rs.initiate() during that period? |
| Comment by Eric Milkie [ 20/Apr/15 ] |
|
Hi Eric, |