Details
-
Bug
-
Resolution: Cannot Reproduce
-
Major - P3
-
None
-
2.6.0-rc2
-
None
-
ALL
Description
Run the following in against the shell:
var cmdObj = {
|
update: 'user',
|
updates: [
|
{ q: { none: 1 }, u: { _id: 0 }, upsert: true },
|
{ q: { none: 1 }, u: { _id: 1 }, upsert: true },
|
{ q: { none: 1 }, u: { _id: 2 }, upsert: true }
|
],
|
ordered: false
|
};
|
db.runCommand(cmdObj);
|
db.runCommand({ getLastError: 1 });
|
mongos response:
{
|
"err" : "insertDocument :: caused by :: 11000 E11000 duplicate key error index: test.user.$_id_ dup key: { : 0.0 }",
|
"code" : 11000,
|
"n" : 0,
|
"singleShard" : "localhost:30000",
|
"ok" : 1
|
}
|
mongod response:
{
|
"connectionId" : 2,
|
"updatedExisting" : false,
|
"upserted" : 2,
|
"n" : 1,
|
"syncMillis" : 0,
|
"writtenTo" : null,
|
"err" : null,
|
"ok" : 1
|
}
|
Note: This appears to only happen on updates write command. In the case of insert, they both return the error when gle is called.
Attachments
Issue Links
- is depended on by
-
SERVER-12954 w parameter is not propagated correctly when calling getLastError on compatibility writeMode
-
- Closed
-