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

applyOps triggers invariant on WCE while applying upsert operations atomically

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 3.5.11
    • Fix Version/s: 3.6.0-rc0
    • Component/s: Querying
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Sprint:
      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

              • Votes:
                0 Vote for this issue
                Watchers:
                11 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: