[SERVER-39319] Warn in the shell when connecting to multiple servers that aren't mongos routers without the replicaSet name Created: 31/Jan/19  Updated: 17/Dec/20  Resolved: 17/Dec/20

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

Type: Improvement Priority: Major - P3
Reporter: Alyson Cabral (Inactive) Assignee: Robert Guo (Inactive)
Resolution: Won't Fix Votes: 0
Labels: move-stm
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-34495 MongoDB Shell does not validate URI f... Closed
Participants:

 Description   

Prior to 3.6, we used to error in all cases where a replica set name is not included. Obviously this meant you couldn't connect to multiple mongos routers. So we removed this restriction and in doing so made it easier for people to make a mistake of not including the replica set name when connecting to replica set nodes.

mongo "mongodb://localhost:27017,localhost:27018,localhost:27019/"
3.4.19 - FailedToParse: Cannot list multiple servers in URL without 'replicaSet' option
3.6.10 - Connection success
4.0.5 - Connection success

I would like us to surface a warning in this case.



 Comments   
Comment by Grigori Melnik (Inactive) [ 06/Feb/19 ]

Should probably also be included in the new Connect experience of Compass

Comment by Scott L'Hommedieu (Inactive) [ 05/Feb/19 ]

Drivers explicitly allow for topology discovery and do not error or warn when no replicaSet option is present.

This is defined here in the SDAM spec.

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