[SERVER-35623] Send a replSetStepUp command to an eligible candidate on stepdown Created: 15/Jun/18 Updated: 29/Oct/23 Resolved: 12/Jul/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | None |
| Fix Version/s: | 3.6.7, 4.0.2, 4.1.1 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Siyuan Zhou | Assignee: | Vesselina Ratcheva (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Backport Requested: |
v4.0, v3.6
|
||||||||||||||||
| Sprint: | Repl 2018-07-02, Repl 2018-07-16 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
After stepdown finishes, the primary sends a replSetStepUp command to a caught-up candidate. If there is more than one viable candidate whose last applied optime is the same as the primary’s, a candidate with the highest priority will be chosen. If that still ties, the node with the lowest index in config.members is chosen. The replSetStepUp command is scheduled to be sent immediately and stepdown doesn’t wait for the response of replSetStepUp command before returning to the user. The chosen secondary will start an election immediately without waiting for the election timeout. |
| Comments |
| Comment by Githook User [ 07/Aug/18 ] |
|
Author: {'username': 'vessy-mongodb', 'name': 'Vesselina Ratcheva', 'email': 'vesselina.ratcheva@10gen.com'}Message: (cherry picked from commit 069e6f06b4e0faef45661ac043c7a4ebcf026d96) |
| Comment by Githook User [ 07/Aug/18 ] |
|
Author: {'username': 'vessy-mongodb', 'name': 'Vesselina Ratcheva', 'email': 'vesselina.ratcheva@10gen.com'}Message: (cherry picked from commit f5405e05491659a1bf7b975fd60124e44e71cdf6) |
| Comment by Githook User [ 06/Aug/18 ] |
|
Author: {'username': 'vessy-mongodb', 'name': 'Vesselina Ratcheva', 'email': 'vesselina.ratcheva@10gen.com'}Message: (cherry picked from commit 069e6f06b4e0faef45661ac043c7a4ebcf026d96) |
| Comment by Githook User [ 06/Aug/18 ] |
|
Author: {'username': 'vessy-mongodb', 'name': 'Vesselina Ratcheva', 'email': 'vesselina.ratcheva@10gen.com'}Message: (cherry picked from commit f5405e05491659a1bf7b975fd60124e44e71cdf6) |
| Comment by Githook User [ 12/Jul/18 ] |
|
Author: {'username': 'vessy-mongodb', 'name': 'Vesselina Ratcheva', 'email': 'vesselina.ratcheva@10gen.com'}Message: |
| Comment by Githook User [ 09/Jul/18 ] |
|
Author: {'username': 'vessy-mongodb', 'name': 'Vesselina Ratcheva', 'email': 'vesselina.ratcheva@10gen.com'}Message: |
| Comment by Tess Avitabile (Inactive) [ 26/Jun/18 ] |
|
For the second commit, can you please include a test for a two-node replica set? This will help us prioritize |
| Comment by Spencer Brody (Inactive) [ 15/Jun/18 ] |
|
I'd like to see this done as two commits - one that adds the function for choosing which node to send stepUp to, with unit tests, and one that actually adds the code to send the command with jstests. |