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

applyOps triggers invariant on WCE while applying upsert operations atomically

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.6.0-rc0
    • Affects Version/s: 3.5.11
    • Component/s: Querying
    • None
    • Fully Compatible
    • ALL
    • Query 2017-09-11, Storage 2017-10-02

      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();
      

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

              Created:
              Updated:
              Resolved: