[SERVER-12963] gle returns wrong result after bulk api in legacy write path Created: 28/Feb/14  Updated: 04/May/15  Resolved: 04/May/15

Status: Closed
Project: Core Server
Component/s: Shell
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Randolph Tan Assignee: Randolph Tan
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

> db.user.insert({ x: 1 })
WriteResult({ "nInserted" : 1 })
> db.user.update({ x: 1 }, { $inc: { x: 1 }})
WriteResult({ "nMatched" : 1, "nUpserted" : 0, "nModified" : 0 })
> db.runCommand({ getLastError: 1 })
{
	"connectionId" : 2,
	"n" : 0,
	"syncMillis" : 0,
	"writtenTo" : null,
	"err" : null,
	"ok" : 1
}

Reason is because bulk api calls resetError after executing the bulk ops.



 Comments   
Comment by Randolph Tan [ 04/May/15 ]

Legacy writes are now deprecated

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