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

GLE on sharded cluster can return previous operation's lastError

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.2.3, 2.3.2
    • Affects Version/s: 2.2.2, 2.3.1
    • Component/s: Sharding, Write Ops
    • None
    • ALL
    • Hide

      see attached.

      Show
      see attached.

      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

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

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

              Created:
              Updated:
              Resolved: