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

GLE on sharded cluster can return previous operation's lastError

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 2.2.3, 2.3.2
    • 2.2.2, 2.3.1
    • 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. dupBad2.js
          4 kB
        2. dupBadAssert.js
          4 kB
        3. dupBad1.js
          2 kB
        4. dupBadAssert.js
          4 kB

        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: