Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-1507

SRV polling not performed if the URI is not passed to the topology

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.3.1
    • Component/s: None
    • Labels:
      None

      Description

      We stopped using the topology.WithConnString option after introducing ApplyURI but this means that the topology doesn't know the URI used to create the Client and therefore cannot actually do things like SRV polling for mongos discovery.

      I propose the following:

      1. Store the initial URI in ClientOptions and add a ClientOptions.GetURI method. If ApplyURI was never called during construction, this returns the empty string.
      2. Add a topology.WithURI option that takes the raw non-parsed URI as a string. This allows the topology to figure out if an SRV URI was used and perform SRV polling if necessary.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              divjot.arora Divjot Arora
              Reporter:
              divjot.arora Divjot Arora
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: