Uploaded image for project: 'Drivers'
  1. Drivers
  2. DRIVERS-2085

Prohibit explicitly set empty replicaSet option

    • Type: Icon: Spec Change Spec Change
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Component/s: URI Options
    • Labels:
      None
    • Needed

      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.

            Assignee:
            Unassigned Unassigned
            Reporter:
            kevin.albertson@mongodb.com Kevin Albertson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: