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

Stepup due to election handoff may not have _voteRequester when it's candidate

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.6.17, 4.2.4, 4.0.16, 4.4.0
    • Component/s: Replication
    • Labels:
      None
    • ALL
    • Repl 2020-03-23, Repl 2020-04-20, Repl 2020-05-04, Repl 2020-05-18, Repl 2020-06-01
    • 0

      ReplicationCoordinatorImpl::_cancelElectionIfNeeded_inlock() assumes a candidate always has a _voteRequester, which isn't true for stepup command that skips dry run.

      Stepup command due to election handoff skips dry run and writes down the vote for itself after changing its role to kCandidate, then releases the mutex. Another thread calling _cancelElectionIfNeeded_inlock() will hit the invariant if it runs in this window until the node finishes the write and starts _voteRequester.

            Assignee:
            siyuan.zhou@mongodb.com Siyuan Zhou
            Reporter:
            siyuan.zhou@mongodb.com Siyuan Zhou
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: