Details
-
Improvement
-
Resolution: Won't Fix
-
Major - P3
-
None
-
None
-
None
-
Sharding
-
Fully Compatible
Description
Currently its possible to run a command on the node that schedules it via
ShardRemote::runCommand. Instead the ShardRemote instance should return a new ErrorCode::CanNotTargetItself. This will allow clients that call it to catch the error and implement a different scenario. e.g. running the command locally.
The possible implementation is to make RemoteCommandTargeter::findHost issue an error if its requested to "target itself". The code written as a part of SERVER-27772 fix needs to address the change when its done.