[SERVER-15438] nextSafe should check query failure bit before inspecting object for error Created: 29/Sep/14  Updated: 11/Jul/16  Resolved: 02/Oct/14

Status: Closed
Project: Core Server
Component/s: Internal Client
Affects Version/s: 2.7.7
Fix Version/s: 2.7.8

Type: Improvement Priority: Major - P3
Reporter: Tyler Brock Assignee: Tyler Brock
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

All


Issue Links:
Depends
is depended on by CXX-361 Merge changes for SERVER-15438 Closed
Related
Participants:

 Description   

scotthernandez brought this to our attention. We should examine wasError field before looking inside the bson obj to see there is an $err field.

It will be faster to check this field first than inspect the document and it will also prevent possible errors where a $err field may exist in the but not signal an error. This is necessary for some mongodb tools that may have to deal with such documents.



 Comments   
Comment by Githook User [ 02/Oct/14 ]

Author:

{u'username': u'TylerBrock', u'name': u'Tyler Brock', u'email': u'tyler.brock@gmail.com'}

Message: SERVER-15438 check wasError before looking inside object for error
Branch: master
https://github.com/mongodb/mongo/commit/354c86d3467e6c6eaec1e91a76bc18b21a510637

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