applyOps triggers invariant on WCE while applying upsert operations atomically

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: 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
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      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
            Reporter:
            Benety Goh
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: