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

applyOps should use a single WriteUnitOfWork where possible

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Blocker - P1 Blocker - P1
    • 3.3.8
    • Affects Version/s: None
    • Component/s: Replication
    • Labels:
    • Fully Compatible
    • v3.2
    • Integrate+Tuning 14 (05/13/16), Integrate+Tuning 15 (06/03/16), Integrate+Tuning 16 (06/24/16)

      Currently we break some guarantees of atomicity by using separate WUOWs for each op and for the final logOp. This can result in a server performing the modification but not adding it to its oplog if the server is shut down in the middle of an applyOps.

      We can't use a single WUOW in the general case because applyOps needs to support operations like building an index that are illegal inside of a WUOW. However, it should be possible to detect if all ops are simple single-document CRUD ops and use a single WUOW in that case. This would cover all uses of applyOps that are used when writing to the config servers.

            Assignee:
            geert.bosch@mongodb.com Geert Bosch
            Reporter:
            mathias@mongodb.com Mathias Stearn
            Votes:
            0 Vote for this issue
            Watchers:
            17 Start watching this issue

              Created:
              Updated:
              Resolved: