[DRIVERS-2085] Prohibit explicitly set empty replicaSet option Created: 26/Jun/19  Updated: 31/Mar/22

Status: Backlog
Project: Drivers
Component/s: URI Options
Fix Version/s: None

Type: Spec Change Priority: Minor - P4
Reporter: Kevin Albertson Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
related to CDRIVER-3073 Do not allow empty string for replicaSet Closed
related to PHPC-1347 Do not allow empty string for replicaSet Closed
Driver Changes: Needed

 Description   

It does not seem possible to start a replica set with an empty string name, but nothing prohibits a user from connecting through the driver with a connection string like:

mongodb://localhost:27017/?replicaSet=

which results in a later server selection failure due to a replica set name mismatch. If an empty replicaSet option is really invalid, let's prohibit it to make it easier for users to diagnose this problem with their connection string.

(Stealing jmikola's comment in PHPC-1347) we could borrow the same language from SPEC-1313's pull request and say that replicaSet must be a string with non-zero length.


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