Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-2564

Clarify how a driver must handle wrong set name in single topology

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.6.0, 4.0.0
    • Component/s: None
    • Labels:
      None

      Description

      Description of Drivers Ticket:

      The SDAM specification allows specifying replica set name in single topology (https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-discovery-and-monitoring.rst#initial-setname). If this is done, the set name specified by the application must match the set name reported by the deployment. https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-discovery-and-monitoring.rst#verifying-setname-with-topologytype-single says:

      > A client MAY allow the user to supply a setName with an initial TopologyType of Single. In this case, if the ServerDescription's setName is null or wrong, the client MUST throw an error on every operation.

      The Ruby driver satisfies this requirement by checking setName during server selection if the deployment is in single topology. However the prescribed server selection procedure in single topology (https://github.com/mongodb/specifications/blob/master/source/server-selection/server-selection.rst#topology-type-single) does not mention such a check.

      In order to improve consistency in how different drivers handle wrong setName when in single topology, either the SDAM or server selection specifications could either recommend or mandate a specific procedure that the drivers must follow when the set name of the deployment does not match the expected set name.
      See DRIVERS-980 for updated details.

        Attachments

          Activity

            People

            Assignee:
            thomas.reggi Thomas Reggi
            Reporter:
            backlog-server-pm Backlog - DB Eng Program Management Team
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: