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

OplogBuffer should throw the buffer shutdown error for push/peek calls if the buffer was signaled to shutdown

    XMLWordPrintable

    Details

      Description

      Currently, there is no contract in which order the oplog buffer should get shutdown relative to oplog fetcher (producer) and oplog applier(consumer) component. This can lead to some undesirable behavior, especially for OplogBufferCollection.
      Consider this below case,
      1) A service/application uses a temp collection as an oplog buffer,
      2) oplog buffer shutdown gets called which leads to dropping of temp collection.
      3) Now, oplog fetcher tries to insert some documents into the buffer collection via write_ops_exec::performInserts(). To be noted, performInserts() will create the collection if the collection is missing before inserting documents. so, now a new non-temporary collection gets created as performInserts() has no access to oplog buffer options

      Second minor consequence, it can unnecessarily make oplog applier to wait for data.

      P.S: The case that I mentioned here is not possible in the current code implementation. The ticket is to lay out the safety rules for oplog buffer.

        Attachments

          Activity

            People

            Assignee:
            backlog-server-repl Backlog - Replication Team
            Reporter:
            suganthi.mani Suganthi Mani
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated: