[SERVER-7958] GLE on sharded cluster can return previous operation's lastError Created: 17/Dec/12  Updated: 11/Jul/16  Resolved: 19/Dec/12

Status: Closed
Project: Core Server
Component/s: Sharding, Write Ops
Affects Version/s: 2.2.2, 2.3.1
Fix Version/s: 2.2.3, 2.3.2

Type: Bug Priority: Major - P3
Reporter: Asya Kamsky Assignee: Eliot Horowitz (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File dupBad1.js     File dupBad2.js     File dupBadAssert.js     File dupBadAssert.js    
Issue Links:
Depends
is depended on by PYTHON-469 Possible to get: E11000 duplicate key... Closed
Duplicate
is duplicated by SERVER-7967 In sharded clusters on failed insert ... Closed
Related
related to SERVER-8097 Inserts don't increment writebacksSince Closed
is related to SERVER-4532 GetLastError on sharded cluster can r... Closed
Operating System: ALL
Steps To Reproduce:

see attached.

Participants:

 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



 Comments   
Comment by auto [ 20/Dec/12 ]

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

Comment by auto [ 20/Dec/12 ]

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

Comment by auto [ 19/Dec/12 ]

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

Comment by auto [ 18/Dec/12 ]

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

Comment by Asya Kamsky [ 18/Dec/12 ]

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

Generated at Thu Feb 08 03:16:09 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.