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

AwaitData cursor must handle getMore from client with higher lastKnownCommittedOpTime

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 3.6.5, 4.0.0-rc0
    • 3.6.9, 4.0.2, 4.1.1
    • Replication
    • None
    • Fully Compatible
    • ALL
    • v4.0, v3.6
    • Repl 2018-06-18, Repl 2018-07-02
    • 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

            samy.lanka@mongodb.com Samyukta Lanka
            tess.avitabile@mongodb.com Tess Avitabile (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: