[SERVER-41479] replSetStepUp on primary should return errors if the node is stepping down Created: 03/Jun/19 Updated: 29/Oct/23 Resolved: 06/Jun/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | None |
| Fix Version/s: | 4.2.0-rc1, 4.3.1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Lingzhi Deng | Assignee: | Lingzhi Deng |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Backport Requested: |
v4.2
|
||||||||
| Sprint: | Repl 2019-06-17 | ||||||||
| Participants: | |||||||||
| Linked BF Score: | 12 | ||||||||
| Description |
|
Currently, if we run replSetStepUp againstĀ a primary, it won't start an election due to this check. And the replSetStepUp command returns success because the node is already primary. However, this could race with stepdown. If the node is in the process of stepping down but hasn't yet changed its state, replSetStepUp still returns success because the node is still in primary state. We should make replSetStepUp behave like isMaster and take isSteppingDown() into account. |
| Comments |
| Comment by Githook User [ 06/Jun/19 ] |
|
Author: {'name': 'Lingzhi Deng', 'email': 'lingzhi.deng@mongodb.com', 'username': 'ldennis'}Message: (cherry picked from commit fbb3e0b7299d0b14ebff5641b3a6c672c18ad96d) |
| Comment by Githook User [ 06/Jun/19 ] |
|
Author: {'name': 'Lingzhi Deng', 'email': 'lingzhi.deng@mongodb.com', 'username': 'ldennis'}Message: |