-
Type: Bug
-
Resolution: Works as Designed
-
Priority: Major - P3
-
Affects Version/s: 1.5.1
-
Component/s: Connectivity
-
None
-
Not Needed
Problem Statement/Rationale
The loadBalanced connection string option is ignored. It should not be:
Steps to Reproduce
$ mongosh mongodb+srv://10673-drivers-testing.2tzoa.mongodb-dev.net Connecting to: mongodb+srv://10673-drivers-testing.2tzoa.mongodb-dev.net/?appName=mongosh+1.5.1 Using MongoDB: 6.0.0 Using Mongosh: 1.5.1 $ mongosh mongodb://10673-drivers-testing-lb.2tzoa.mongodb-dev.net/?tls=true&loadBalanced=true Connecting to: mongodb://10673-drivers-testing-lb.2tzoa.mongodb-dev.net/?tls=true&directConnection=true&appName=mongosh+1.5.1 MongoServerSelectionError: The server is being accessed through a load balancer, but this driver does not have load balancing enabled
Expected Results
mongosh should include the loadBalanced connection string option and be able to connect
Actual Results
The loadBalanced option appears to be dropped, and connections fail
Additional Notes
Maybe this has not been noticed because it works for mongodb+srv connection strings where the option is part of the TXT record that is discovered by the driver itself.