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
    • Needed
    • $i18n.getText("admin.common.words.hide")
      Key Status/Resolution FixVersion
      PHPC-1347 Fixed 1.7.0
      CDRIVER-3073 Fixed 1.15.0
      $i18n.getText("admin.common.words.show")
      #scriptField, #scriptField *{ border: 1px solid black; } #scriptField{ border-collapse: collapse; } #scriptField td { text-align: center; /* Center-align text in table cells */ } #scriptField td.key { text-align: left; /* Left-align text in the Key column */ } #scriptField a { text-decoration: none; /* Remove underlines from links */ border: none; /* Remove border from links */ } /* Add green background color to cells with FixVersion */ #scriptField td.hasFixVersion { background-color: #00FF00; /* Green color code */ } /* Center-align the first row headers */ #scriptField th { text-align: center; } Key Status/Resolution FixVersion PHPC-1347 Fixed 1.7.0 CDRIVER-3073 Fixed 1.15.0

      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: