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

GLE on sharded cluster can return previous operation's lastError

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Done
    • 2.2.2, 2.3.1
    • 2.2.3, 2.3.2
    • Sharding, Write Ops
    • None
    • ALL
    • Hide

      see attached.

      Show
      see attached.

    Description

      In some situations migration that happens between two operations can cause first operation's GLE result to be returned to GLE call after second operation.

      Running attached js file like so (omitting startup and shutdown lines):
      mongo --nodb dupBad2.js | grep -v "^ m39" | grep -v "^ m30"

      Number of successful updates on node: 0


      successful update on node on A
      n=0,
      updatedExisting=true,
      err=E11000 duplicate key error index: test.trans.$owner_1 dup key: { : 1234567890 }



      successful update on node on B
      n=0,
      updatedExisting=true,
      err=E11000 duplicate key error index: test.trans.$owner_1 dup key: { : 1234567890 }


      Number of successful updates on node: 2

      Attachments

        1. dupBad1.js
          2 kB
        2. dupBad2.js
          4 kB
        3. dupBadAssert.js
          4 kB
        4. dupBadAssert.js
          4 kB

        Issue Links

          Activity

            People

              eliot Eliot Horowitz (Inactive)
              asya.kamsky@mongodb.com Asya Kamsky
              Votes:
              0 Vote for this issue
              Watchers:
              13 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: