Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-41479

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

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 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

      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@mongodb.com Lingzhi Deng
            Reporter:
            lingzhi.deng@mongodb.com Lingzhi Deng
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: