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

Incorrect use of candidateIndex from a previous config during vote processing.

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Replication
    • None
    • Replication
    • ALL

    Description

      After we granted vote for a node in config C0, and recorded the `candidateIndex` in `lastVote`, later we could install a new config C1 from another node due to heartbeat, and next time when we are voting, our `_rsConfig` is already a new one, but the `candidateIndex` was based on an old config, so calling `_rsConfig.getMemberAt(_lastVote.getCandidateIndex())` is not correct. This would result in incorrect logs and metrics. Ideally we should record in `_lastVote` the direct information of the candidate node (like memberId and host/port) instead of an index which can vary across configs. This is regardless of using the strict config term/version comparison rule or the relaxed one.

      Attachments

        Activity

          People

            backlog-server-repl Backlog - Replication Team
            wenbin.zhu@mongodb.com Wenbin Zhu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: