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

Use lastOpTimeFetched rather than lastOpTimeApplied for election purposes

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Replication
    • Replication

      We should look into using lastOpTimeFetched rather than lastOpTimeApplied for election purposes. In particular, candidates for election would use it for the "lastLogIndex" field of the RAFT RequestVote RPC and voters would refuse to vote for anyone who is behind their lastOpTimeFetched. I think this will avoid the odd case where a majority of nodes can accept an op and apply it, but it will still be rolled back. I think this also is closer to my reading of RAFT's log[] state given the way that we split the AppendEntries RPC with the "request" being the reply from a getMore and the "reply" being the upatePosition command request.

            Assignee:
            backlog-server-repl [DO NOT USE] Backlog - Replication Team
            Reporter:
            mathias@mongodb.com Mathias Stearn
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated: