[SERVER-43169] Return self descriptive error when running replSetGetConfig from the mongos Created: 05/Sep/19  Updated: 09/Oct/19  Resolved: 09/Oct/19

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

Type: Improvement Priority: Trivial - P5
Reporter: Linda Qin Assignee: Mira Carey
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:
Case:

 Description   

The replSetGetConfig is not supported on the mongos. Currently, when we run this command from the mongos, it returns the error "no such cmd: replSetGetConfig".

It would be nice if we can return some self descriptive error such as:

replSetGetConfig is not supported through mongos



 Comments   
Comment by Mira Carey [ 09/Oct/19 ]

There are many commands that work on mongod and don't work on mongos. Also many commands that work differently on those two process types (killop comes to mind).

While I agree that this would be nice to have, I don't think it's useful to tackle as a one off, and I don't think we can solve the problem generally (because to do a really good job we'd have to be able to tell what was actually a mongod command when run on a mongos, and backport that knowledge to older versions).

So unfortunately, closing out as wontfix.

Generated at Thu Feb 08 05:02:27 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.