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

applyOps doesn't wait for replication on the last op if it's a noop

    XMLWordPrintableJSON

Details

    • Replication
    • ALL

    Description

      When a write concern is provided to the applyOps command, we normally wait on the OpTime of whichever operation successfully completed last. This is erroneous, however, if the last operation in the array happens to be a write no-op and thus isn’t assigned an OpTime. Let the second to last operation in the applyOps be write A, the last operation in applyOps be write B. Let B do a no-op write and let the operation that caused B to be a no-op be C. If C has an OpTime ahead of A, then we won’t wait for C to be replicated and it could be rolled back, even though B was acknowledged. To fix this, we should wait for replication of the node’s last applied OpTime if the last write operation was a no-op write.

      Attachments

        Issue Links

          Activity

            People

              backlog-server-repl Backlog - Replication Team
              judah.schvimer@mongodb.com Judah Schvimer
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated: