[SERVER-5824] improve error reporting for pipeline failures on shards Created: 11/May/12  Updated: 10/Dec/14  Resolved: 01/Apr/13

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

Type: Improvement Priority: Major - P3
Reporter: Daniel Pasette (Inactive) Assignee: Mathias Stearn
Resolution: Done Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Participants:

 Description   

When an aggregation pipeline fails on a shard, we wrap the message in mongos, but the wrapping doesn't propagate the error code, just the wrapped message string. See https://groups.google.com/forum/?fromgroups#!topic/mongodb-user/BhKG6B3EAVA for an example.



 Comments   
Comment by Mathias Stearn [ 01/Apr/13 ]

I think this was fixed in 2.2. We now convert the entire returned object (including the error code) to a string and include it in the output. While the "code" field in the final output will be different the original error code will be included in the output to enable debugging.

https://github.com/mongodb/mongo/blob/master/src/mongo/db/pipeline/document_source_command_shards.cpp#L103-106

Please reopen if this is insufficient.

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