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

Fix srvMaxHosts SRV polling shuffling logic

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor - P4 Minor - P4
    • 1.8.0
    • None
    • None
    • None

    Description

      In SRV polling, if srvMaxHosts is declared, we currently shuffle the list of parsed hosts returned from t.dnsResolver.ParseHosts and then call processSRVResults on those parsed hosts. Depending on the outcome of the shuffle, that logic can result in accidentally losing an existing SRV record. We should move the shuffling logic for SRV polling into processSRVResults to account for this.

      Also, now that we've dropped support for Golang 1.9, we can just use rand.Shuffle here and here as stated in the TODO (I missed this in GODRIVER-1876).

      Attachments

        Activity

          People

            matt.dale@mongodb.com Matt Dale
            benji.rewis@mongodb.com Benji Rewis (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: