[SERVER-1401] Dont call getLastError if last statement didn't go to server Created: 12/Jul/10  Updated: 12/Jul/16  Resolved: 21/Sep/11

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

Type: Improvement Priority: Minor - P4
Reporter: Mathias Stearn Assignee: Antoine Girbal
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-3816 unexpected error messsage setting sla... Closed
Participants:

 Description   

> db.getLastError()
final reduce failed:

{ result: "tmp.mr.mapreduce_1278955206_2", assertion: "invoke failed: JS Error: TypeError: Array.sum is not a function nofile_b:1", assertionCode: 9004, errmsg: "db assertion failure", ok: 0.0 }

> function foo(){}
final reduce failed:

{ result: "tmp.mr.mapreduce_1278955206_2", assertion: "invoke failed: JS Error: TypeError: Array.sum is not a function nofile_b:1", assertionCode: 9004, errmsg: "db assertion failure", ok: 0.0 }

 Comments   
Comment by auto [ 21/Sep/11 ]

Author:

{u'login': u'agirbal', u'name': u'agirbal', u'email': u'antoine@10gen.com'}

Message: SERVER-1401: getLastError only called once per line input, if a write op was executed
Branch: master
https://github.com/mongodb/mongo/commit/ab33a82e252718a7ce6d0dee847be73b47079ff7

Comment by Eliot Horowitz (Inactive) [ 21/Sep/11 ]

We can't have every update call getLastError
We have lots of tests and people have lots of scripts that assume updates are just fired down the pipe.

Comment by Antoine Girbal [ 21/Sep/11 ]

getLastError is not called every time a result is undefined anymore.
It was especially confusing when talking to a slave with slaveOk=false.
Now getLastError is called directly by insert/update/remove.

Comment by auto [ 21/Sep/11 ]

Author:

{u'login': u'agirbal', u'name': u'agirbal', u'email': u'antoine@10gen.com'}

Message: SERVER-1401: Dont call getLastError if last statement didn't go to server
SERVER-1507: improve output. Also display for inserts.
Branch: master
https://github.com/mongodb/mongo/commit/61d496c3dd7940565d6299980a1ce0a3ee913a0e

Generated at Thu Feb 08 02:56:55 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.