Uploaded image for project: 'MongoDB Shell'
  1. MongoDB Shell
  2. MONGOSH-1277

loadBalanced connection string option is ignored

    • Type: Icon: Bug Bug
    • Resolution: Works as Designed
    • Priority: Icon: Major - P3 Major - P3
    • No version
    • Affects Version/s: 1.5.1
    • Component/s: Connectivity
    • Labels:
      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.

            Assignee:
            Unassigned Unassigned
            Reporter:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: