Check for term equality when comparing OpTime for a writeConcern

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 4.3.1
    • Affects Version/s: None
    • Component/s: Replication
    • None
    • Fully Compatible
    • ALL
    • Repl 2019-10-21
    • 28
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      haveNumNodesReachedOpTime and haveTaggedNodesReachedOpTime currently use OpTime comparison functions defined here. But if a OpTime with a higher term comes via heartbeat, we shouldn't consider that as a writeConcern satisfaction. So we should also check for term equality before waking up writeConcern waiters. If a higher term comes, it means that the node will be stepping down. And on member state changes after the stepDown, the existing logic should be able to wake up all remaining waiters with stepDown errors.

            Assignee:
            Lingzhi Deng
            Reporter:
            Lingzhi Deng
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: