[SERVER-13050] Misleading error message with aggregation explain on mixed-version cluster Created: 05/Mar/14  Updated: 11/Jul/16  Resolved: 06/Mar/14

Status: Closed
Project: Core Server
Component/s: Aggregation Framework, Sharding
Affects Version/s: 2.4.9, 2.6.0-rc0
Fix Version/s: 2.6.0-rc2

Type: Bug Priority: Major - P3
Reporter: Samantha Ritter (Inactive) Assignee: Mathias Stearn
Resolution: Done Votes: 0
Labels: 26qa, aggregate
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-12760 Running aggregation query with $expla... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

We have a cluster with a 2.6 mongos, a 2.6 mongod as one shard, and a 2.4 as a second shard. We expect the following query to cause an error:

> db.coll.aggregate([{ "$project" : { "_id" : "$_id" }}], { explain: true })

However, the error message we get back is 'unrecognized field "cursor,"' when it really could be something more helpful like "explain is not supported for aggregation queries on mixed-version clusters."



 Comments   
Comment by Githook User [ 06/Mar/14 ]

Author:

{u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

Message: SERVER-13050 Don't send "cursor" to shards when doing agg explain

Follow up to SERVER-12760. If cursor is sent to the shards, the explain will
fail for the wrong reason and we would give a worse error message. With this
change we now correctly report that the explain failed because one of the
shards doesn't support explain.
Branch: master
https://github.com/mongodb/mongo/commit/3befa12b80bc656e72cd80669ceb5e799ba762ff

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