replSetStepUp on primary should return errors if the node is stepping down

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 4.2.0-rc1, 4.3.1
    • Affects Version/s: None
    • Component/s: Replication
    • None
    • Fully Compatible
    • ALL
    • v4.2
    • Repl 2019-06-17
    • 12
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

              Assignee:
              Lingzhi Deng
              Reporter:
              Lingzhi Deng
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: