Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-284

Support replica set name in MongoClientURI and MongoClientOptions

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.12.0, 3.0.0
    • Affects Version/s: 2.5
    • Component/s: Configuration
    • Fully Compatible

      As in other drivers, the name of the query parameter in the URI is replicaSet. In MongoClientOptions, the slightly more descriptive property name of requiredReplicaSetName will be used. The presence of the replica set name in either place will have two effects:

      1. it will force the driver into replica-set mode, which means that even if there is only one member provided in the seed list, the driver will treat this as a replica set connection and discover all members (even so, users are still highly encouraged to provide at least a three member seed list).
      2. the driver will drop seed list members that are either not replica set members or else members of a replica set with a different name. This will be logged as SEVERE.

            Assignee:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Reporter:
            brendan Brendan W. McAdams
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: