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

Go 1.11 cannot handle TXT records with multiple strings

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 0.0.13
    • None
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      The way net.LookupTXT functions changed in Go 1.11. Previously, a TXT record with multiple components would be returned as a single string, which means a TXT record with the fields "a" "b" and "c" would be returned as "abc". Multiple TXT records would be returned as multiple strings. So if there were 2 TXT records one with "foo" and another with "bar", they would be returned as two separate strings.

      The handling of multiple strings within a TXT record was incorrect, but interface made an assumption that there would be one string returned for each TXT record. Go 1.11 handles this by just returning all the fields separately, so a TXT record with "a" "b" "c" will return 3 strings. This means there is no way to determine from the returned values if there was one TXT record with multiple fields or if there were multiple TXT records.

      Since there is no way to expose the internals of the LookupTXT function we'll need to come up with an alternative way of handling this functionality. In the interim we should just skip the test. If Go doesn't provide a new LookupTXT function in Go 1.12, then we'll need to either ignore the part of the initial DNS seedlist discovery specification the requires handling one TXT with a multiple strings and multiple TXT records or we'll need to implement our own DNS lookups using a library like https://github.com/miekg/dns.

            Assignee:
            qingyang.hu@mongodb.com Qingyang Hu
            Reporter:
            kris.brandow@mongodb.com Kristofer Brandow (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: