[SERVER-18814] ClusterPipelineCmd calls find on $cmd collection directly instead of using runCommand Created: 03/Jun/15  Updated: 06/Dec/22  Resolved: 07/Jun/17

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

Type: Bug Priority: Major - P3
Reporter: Adam Midvidy Assignee: Backlog - Query Team (Inactive)
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-18292 Re-enable all tests tagged with SERVE... Closed
Duplicate
duplicates SERVER-28625 replace ClusterAggregate's use of Str... Closed
Related
related to SERVER-18813 ClusterPipelineCmd can fail to throw ... Closed
Assigned Teams:
Query
Operating System: ALL
Participants:

 Description   

This prevents the use of OP_COMMAND in sharded agg queries.

See ClusterPipelineCmd::aggRunCommand, ClusterPipelineCmd::aggPassthrough



 Comments   
Comment by David Storch [ 07/Jun/17 ]

This code was removed in commit 09cb438f36a697 as part of SERVER-28625. I'm resolving this ticket as a duplicate.

Comment by Andy Schwerin [ 28/Sep/15 ]

I believe the new mongos find path only uses this hack when communicating with legacy SCCC config servers, not data shards or the CSRS config shard.

Comment by David Storch [ 17/Sep/15 ]

The new find path on mongos uses the same hack as agg, and should also benefit from the fix for this ticket:

https://github.com/mongodb/mongo/blob/e384c081d12a8b483a8f3af86b457898cff11d65/src/mongo/s/query/cluster_find.cpp#L147-L159

Comment by Adam Midvidy [ 03/Jun/15 ]

After discussion with Mathias, I am going to make an overload of runCommand that allows the caller to see what host actually ran the command. This information is already exposed in DBConnector::call, so it's just a matter of passing it up the call stack.

Comment by Mathias Stearn [ 03/Jun/15 ]

Any sharded command that can return cursors needs to be able to run a command on a shard (which may be a replica set) and get back both the response and the exact host that the command was run on. Currently this is only possible using the low-level DBClientCursor API.

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