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

In sharded clusters on failed insert GLE sometimes returns null err field

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Duplicate
    • 2.2.2, 2.3.1
    • None
    • Sharding
    • None
    • ALL
    • Hide

      see attached

      Show
      see attached

    Description

      When doing an insert into a sharded collection because of SERVER-4381 but in attached testcase it does not properly set "err:" field and "code:" field when writeback listeners are involved.

      Before fix for SERVER-4532 and SERVER-7958 the attached code would set err: but not code: fields (so it would fail in the first failed asserts before split/migration) however testing it with both of those fixes now it returns proper GLE before split/migrate but after returns:

      assert failed : Insert of a duplicate record after split/migrate did not create correct GLE{
      "singleShard" : "localhost:30000",
      "n" : 0,
      "connectionId" : 21,
      "err" : null,
      "ok" : 1,
      "code" : 11000,
      "writebackGLE" :

      { "singleShard" : "localhost:30000", "n" : 0, "connectionId" : 21, "err" : null, "ok" : 1 }

      ,
      "initialGLEHost" : "localhost:30000",
      "initialGLE" : {
      "err" : "E11000 duplicate key error index: test.trans.$owner_1 dup key: { : 1234567890 }",
      "code" : 11000,
      "n" : 0,
      "connectionId" : 16,
      "ok" : 1
      }
      }

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              asya.kamsky@mongodb.com Asya Kamsky
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: