Use lastFetched from previous batch when comparing optimes for re-evaluating sync source

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 4.7.0
    • Affects Version/s: None
    • Component/s: Replication
    • None
    • Fully Compatible
    • Repl 2020-07-13
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Instead of using the latest optime for the batch that was just fetched, we should use the latest optime in the previous batch. If we find that the node wants to change sync sources, then we will abandon the batch that was just fetched and try to sync from another node.

      This will make it more likely for a node to switch sync sources when they are at similar optimes, because it increases the chances that the node thinks it is behind the other node.

            Assignee:
            Xuerui Fa
            Reporter:
            Samyukta Lanka
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: