[DRIVERS-2045] Clarify that the default seed list should be ["localhost:27017"], not the server list Created: 29/Oct/18  Updated: 31/Mar/22

Status: Backlog
Project: Drivers
Component/s: SDAM
Fix Version/s: None

Type: Spec Change Priority: Major - P3
Reporter: May Hoque Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Driver Changes: Needed

 Description   

Currently, in server-discovery-and-monitoring.rst, we state that the default server list should be a list containing a single server at localhost:27017:

servers: a set of ServerDescription instances. Default contains one server: "localhost:27017", ServerType Unknown.

However, this does not seem to match the spec tests:

{
  "topology_description_changed_event": {
    "topologyId": "42",
    "previousDescription": {
      "topologyType": "Unknown",
      "servers": []
    },
    "newDescription": {
      "topologyType": "Single",
      "servers": [
        {
          "address": "a:27017",
          "arbiters": [],
          "hosts": [],
          "passives": [],
          "type": "Unknown"
        }
      ]
    }
  }
}

This should probably refer to the seed list, not the server list. See this discussion on #drivers for more information.

A big thanks to kevin.albertson for his help with this.



 Comments   
Comment by Ian Whalen (Inactive) [ 19/Mar/19 ]

K I'm moving this back to open and closing 503 in github just to reduce the number of open PRs, but we can obvi reopen that or start a new PR whenever this does get scheduled.

Comment by Matt Broadstone [ 19/Mar/19 ]

ian.whalen SGTM

Comment by Ian Whalen (Inactive) [ 18/Mar/19 ]

matt.broadstone given the interest in reducing spec churn in the runup to 4.2, is it OK to move this back to backlog for now?

Comment by Oleg Pudeyev (Inactive) [ 27/Feb/19 ]

I made a PR simplifying the language which was my proposal: https://github.com/mongodb/specifications/pull/503

This is a little different from the title of this ticket which requires that drivers default the seed list to ['localhost:27017']. Ruby, for example, does not have such a default, and allows creating a client with no servers in it at all.

Comment by Matt Broadstone [ 22/Jan/19 ]

oleg.pudeyev agreed, can you please open a PR with this change at your convenience?

Comment by Oleg Pudeyev (Inactive) [ 07/Nov/18 ]

In https://github.com/mongodb/specifications/pull/388 it was resolved that in the SDAM events, the starting topology is always unknown with no servers, even when the driver allows a user to force a topology type and specifies a non-empty server list.

The concept of a "default list of server description instances" doesn't make a lot of sense to me given this initial state.

It is also possible for a topology to start with a non-empty set of servers and end up with no servers, thus the state of having an empty list of server descriptions is a valid one.

I propose that the phrase "Default contains one server: "localhost:27017", ServerType Unknown." is removed from the spec. If the field needs to be clarified, my suggestion would be something like this:

servers: a set of ServerDescription instances, one for each of the servers in the topology.

Generated at Thu Feb 08 08:24:34 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.