-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Replication
-
None
-
Fully Compatible
-
ALL
-
v4.2
-
Repl 2019-06-17
-
12
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.