[SERVER-4989] MR: errors that happen during sharded post processing are ignored Created: 16/Feb/12  Updated: 11/Jul/16  Resolved: 03/Apr/12

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

Type: Bug Priority: Major - P3
Reporter: Antoine Girbal Assignee: Antoine Girbal
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

If output collection is not sharded it properly errors, but if sharded then it returns with empty results.
it is easy to reproduce issue if using "replace" in conjunction with "nonAtomic" which errors.

Source of issue seems to be that MR code used to spawn Future objects and then check on status,
but now that code has been buried into a call like:
SHARDED->commandOp( dbName, shardedCommand, 0, fullns, q, results );
That call seems to not properly report the exception.



 Comments   
Comment by auto [ 18/Feb/12 ]

Author:

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

Message: SERVER-4989: MR: errors that happen during sharded post processing are ignored
Branch: master
https://github.com/mongodb/mongo/commit/49405ce14fc98462a09f94b3c0b79ebe817aa6d3

Comment by Antoine Girbal [ 16/Feb/12 ]

yes that's good behavior, just the checks disappeared during the refactor.
Will add checks on returned object.

Comment by Greg Studer [ 16/Feb/12 ]

Actually, commandOp will throw if there's a result with the error flag set - this is arguably not correct behavior for commands, but would merit another JIRA.

Comment by Greg Studer [ 16/Feb/12 ]

Think this may be the correct behavior overall? - the idea behind commandOp is that it will return the results of commands across all shards, and will throw only if there's an issue processing the command. If the command itself is processed correctly but returns !ok, we may want to handle partial results.

Helpers could be useful though - maybe verifiedCommandOp() which would go through the results and throw the first exception it finds from a !ok result.

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