[SERVER-35058] Don't only rely on heartbeat to signal secondary positions in stepdown command Created: 17/May/18 Updated: 29/Oct/23 Resolved: 03/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-06-04, Repl 2018-06-18, Repl 2018-07-02 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
replSetStepDown command waits for a majority of nodes to catch up and one of them to be an eligible candidate, but such event is only signaled when processing heartbeat responses, which adds more delay to the handoff. The easiest and less efficient fix is to signal the condition variable whenever we update the last applied optime. The better solution is to replace the conditional variable with a waiter in _replicationWaiterList as in _awaitReplication_inlock(). A third solution is to call _awaitReplication_inlock(), which might not be desired since the condition stepdown command is waiting on is slightly different than w: majority + an eligible candidate specified in config. |
| Comments |
| Comment by Githook User [ 04/Apr/21 ] |
|
Author: {'name': 'Vesselina Ratcheva', 'email': 'vesselina.ratcheva@10gen.com', 'username': 'vessy-mongodb'}Message: (cherry picked from commit 9df6cbae9c20bdce759deb806e5175b7fc83d007) |
| Comment by Githook User [ 09/Aug/18 ] |
|
Author: {'name': 'Vesselina Ratcheva', 'email': 'vesselina.ratcheva@10gen.com', 'username': 'vessy-mongodb'}Message: (cherry picked from commit 925a113194e00e193318486f576d14e6c3e27ea1) |
| Comment by Githook User [ 06/Aug/18 ] |
|
Author: {'username': 'vessy-mongodb', 'name': 'Vesselina Ratcheva', 'email': 'vesselina.ratcheva@10gen.com'}Message: (cherry picked from commit 925a113194e00e193318486f576d14e6c3e27ea1) |
| Comment by Githook User [ 06/Aug/18 ] |
|
Author: {'username': 'vessy-mongodb', 'name': 'Vesselina Ratcheva', 'email': 'vesselina.ratcheva@10gen.com'}Message: (cherry picked from commit 9df6cbae9c20bdce759deb806e5175b7fc83d007) |
| Comment by Githook User [ 03/Jul/18 ] |
|
Author: {'username': 'vessy-mongodb', 'name': 'Vesselina Ratcheva', 'email': 'vesselina.ratcheva@10gen.com'}Message: |
| Comment by Githook User [ 21/Jun/18 ] |
|
Author: {'username': 'vessy-mongodb', 'name': 'Vesselina Ratcheva', 'email': 'vesselina.ratcheva@10gen.com'}Message: |