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

applyOps triggers invariant on WCE while applying upsert operations atomically

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 3.5.11
    • 3.6.0-rc0
    • Querying
    • None
    • Fully Compatible
    • ALL
    • Query 2017-09-11, Storage 2017-10-02

    Description

      The update query executor runs the document insert inside a WriteUnitOfWork. When run atomically, the applyOps command also wraps lower level function calls (such as upsert) in a WriteUnitOfWork This may lead to an invariant when a WriteConflictException is thrown while inserting the document as part of an upsert.

      To reproduce this issue, run the following JS test code using resmoke.py with --repeat=100:

          load("jstests/replsets/libs/apply_ops_insert_write_conflict.js");
       
          new ApplyOpsInsertWriteConflictTest({
              testName: 'apply_ops_insert_write_conflict_atomic',
              atomic: true
          }).run();
      

      Attachments

        Issue Links

          Activity

            People

              benety.goh@mongodb.com Benety Goh
              benety.goh@mongodb.com Benety Goh
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: