[SERVER-28313] mongos can runCommand on specified shard Created: 15/Mar/17  Updated: 27/Oct/23  Resolved: 28/Mar/17

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

Type: Improvement Priority: Major - P3
Reporter: Zhang Youdong Assignee: [DO NOT USE] Backlog - Sharding Team
Resolution: Works as Designed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Sharding
Participants:

 Description   

Users should have the ability to runCommand on a specified shard,eg. to get the slow query from shard through mongos.



 Comments   
Comment by Andy Schwerin [ 28/Mar/17 ]

The shards themselves are not part of the api of a mongodb cluster, but an operational detail. Further, it is not safe to allow end users to execute arbitrary commands against shard servers, as it doing so can corrupt the state of the cluster or reveal information to which the end user may not be entitled.

Operators who need to directly access member nodes of shard replica sets should contact those nodes directly.

Comment by Mark Agarunov [ 15/Mar/17 ]

Hello zyd_com,

Thank you for your feedback. I've set the fixVersion to "Needs Triage" for this new feature to be scheduled against our currently planned work. Updates will be posted on this ticket as they happen.

Please note that it is possible to connect directly to a specific shard instead of connecting through mongos to execute a query on that specific shard.

Thanks,
Mark

Generated at Thu Feb 08 04:17:46 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.