-
Type: Improvement
-
Resolution: Won't Fix
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Shell
-
None
-
Server Tooling & Methods
Drivers provide two ways to discover the topology of a deployment and connect to it appropriately:
- By specifying multiple hosts:
mongo mongodb://localhost:14420,localhost:14421
- By specifying directConnection=false URI option (recently standardized in https://github.com/mongodb/specifications/commit/e56f5eceed7729f8b9b43a4a1f76c7e5840db49f).
It seems to me that mongo shell does not implement either of these behaviors.
Specifically, there appears to be no way to connect to replica set using mongo shell without providing the replica set name.
The decision across drivers was to implement topology discovery by default. New drivers must implement it, existing drivers can continue with their existing behavior for BC reasons.
To improve usability of the shell and make it consistent with drivers, I suggest implementing one or both of the above mentioned ways of discovering and connecting to replica set without specifying replica set name explicitly.