Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-1442

Topology(Description) has no server knowledge

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 2.7.0.rc0
    • Affects Version/s: 2.6.0
    • Component/s: Spec Comp
    • Labels:
      None

      SDAM spec specifies, in particular, for what it calls a TopologyDescription to have this field:

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

      Ruby driver does not have a TopologyDescription class. The closest thing is Topology, however driver's Topology has no knowledge of the servers in the cluster - that's stored in Cluster under addresses/servers.

      As a result:

      1. SDAM events cannot be triggered on a topology - they must be triggered on cluster.
      2. It's impossible to go from topology to its servers since the topoogy has no knowledge of its servers. Clients must obtain a cluster instance and figure out the servers on their own.
      2. When we dispatch a topology description changed event, this event doesn't carry old/new servers since there is no place to store them. In order for client code to obtain old servers the driver must dispatch the event prior to updating the cluster, and then the cluster will hold the old servers. These hoops also make implementing spec tests complicated.

            Assignee:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Reporter:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: