Core Server
  1. Core Server
  2. SERVER-7958

GLE on sharded cluster can return previous operation's lastError

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major - P3 Major - P3
    • Resolution: Fixed
    • Affects Version/s: 2.2.2, 2.3.1
    • Fix Version/s: 2.2.3, 2.3.2
    • Component/s: Sharding, Write Ops
    • Labels:
      None
    • Backport:
      Done
    • Operating System:
      ALL
    • Bug Type:
      Logical
    • # Replies:
      5
    • Last comment by Customer:
      false
    • Steps To Reproduce:
      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

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

        Issue Links

          Activity

          Hide
          Asya Kamsky
          added a comment -

          fixed up test with asserts for multiple scenarios, covering the edge cases discovered in SERVER-7967

          Show
          Asya Kamsky
          added a comment - fixed up test with asserts for multiple scenarios, covering the edge cases discovered in SERVER-7967
          Hide
          auto
          added a comment -

          Author:

          {u'date': u'2012-12-18T05:00:53Z', u'name': u'Eliot Horowitz', u'email': u'eliot@10gen.com'}

          Message: SERVER-7958 - when an old operation has a writeback,
          make sure not to use that info in the user writeback
          just block
          Branch: master
          https://github.com/mongodb/mongo/commit/4dfc7f12d4bdefcf4d5d85a2efd227fdfe730f33

          Show
          auto
          added a comment - Author: {u'date': u'2012-12-18T05:00:53Z', u'name': u'Eliot Horowitz', u'email': u'eliot@10gen.com'} Message: SERVER-7958 - when an old operation has a writeback, make sure not to use that info in the user writeback just block Branch: master https://github.com/mongodb/mongo/commit/4dfc7f12d4bdefcf4d5d85a2efd227fdfe730f33
          Hide
          auto
          added a comment -

          Author:

          {u'date': u'2012-12-18T05:00:53Z', u'email': u'eliot@10gen.com', u'name': u'Eliot Horowitz'}

          Message: SERVER-7958 - when an old operation has a writeback,
          make sure not to use that info in the user writeback
          just block
          Branch: v2.2
          https://github.com/mongodb/mongo/commit/8014832a4a4e0925dda1351e0113c7c7b9af94eb

          Show
          auto
          added a comment - Author: {u'date': u'2012-12-18T05:00:53Z', u'email': u'eliot@10gen.com', u'name': u'Eliot Horowitz'} Message: SERVER-7958 - when an old operation has a writeback, make sure not to use that info in the user writeback just block Branch: v2.2 https://github.com/mongodb/mongo/commit/8014832a4a4e0925dda1351e0113c7c7b9af94eb
          Hide
          auto
          added a comment -

          Author:

          {u'date': u'2012-12-20T03:19:18Z', u'email': u'eliot@10gen.com', u'name': u'Eliot Horowitz'}

          Message: SERVER-7958 - make test more resilient to gle field ordering
          Branch: master
          https://github.com/mongodb/mongo/commit/c49f0d43433ea41d16d27916aa119cbbb615e730

          Show
          auto
          added a comment - Author: {u'date': u'2012-12-20T03:19:18Z', u'email': u'eliot@10gen.com', u'name': u'Eliot Horowitz'} Message: SERVER-7958 - make test more resilient to gle field ordering Branch: master https://github.com/mongodb/mongo/commit/c49f0d43433ea41d16d27916aa119cbbb615e730
          Hide
          auto
          added a comment -

          Author:

          {u'date': u'2012-12-20T03:19:18Z', u'email': u'eliot@10gen.com', u'name': u'Eliot Horowitz'}

          Message: SERVER-7958 - make test more resilient to gle field ordering
          Branch: v2.2
          https://github.com/mongodb/mongo/commit/5baf992b906f440ce99f917d1d53767a303be7f9

          Show
          auto
          added a comment - Author: {u'date': u'2012-12-20T03:19:18Z', u'email': u'eliot@10gen.com', u'name': u'Eliot Horowitz'} Message: SERVER-7958 - make test more resilient to gle field ordering Branch: v2.2 https://github.com/mongodb/mongo/commit/5baf992b906f440ce99f917d1d53767a303be7f9

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Days since reply:
                1 year, 17 weeks, 4 days ago
                Date of 1st Reply: