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

AwaitData cursor must handle getMore from client with higher lastKnownCommittedOpTime

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 3.6.5, 4.0.0-rc0
    • Fix Version/s: 3.6.9, 4.0.2, 4.1.1
    • Component/s: Replication
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v4.0, v3.6
    • Sprint:
      Repl 2018-06-18, Repl 2018-07-02
    • Linked BF Score:
      60

      Description

      In PlanExecutor::getNextImpl(), we will construct a CappedInsertNotifier if shouldWaitForInserts() returns true. Then, if we reach EOF, we will call waitForInserts() if shouldWaitForInserts() returns true. waitForInserts() invariants that the CappedInsertNotifier exists. This means that we can hit the invariant if shouldWaitForInserts() returns false and then later returns true. This can happen if the request specifies a lastKnownCommittedOpTime that is greater than the node's last committed op time and then the node's last committed op time moves forward so that the values are equal. That would cause this check to return false and then true. It is legal in replication for the downstream node to have a higher view of the committed op time than its sync source, so this code must be robust to that event.

        Attachments

          Activity

            People

            Assignee:
            samy.lanka Samyukta Lanka
            Reporter:
            tess.avitabile Tess Avitabile
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: