vertica / vertica-sql-go

Official native Go client for the Vertica Analytics Database.
http://www.vertica.com
Apache License 2.0
61 stars 28 forks source link

Restore DNS Round Robin Behavior #134

Closed DMickens closed 2 years ago

DMickens commented 2 years ago

Restoration of DNS Round Robin Behavior.

This change is implemented in the establishSocketConnection() function. Unfortunately, net.Dial was doing a lot of the heavy lifting in the implementation that did not have DNS Round Robin Behavior, so the changes are slightly more involved that originally hoped. I've had to implement code to parse the host and port being stored in the net.Conn instance and handle DNS resolution. Then, after randomizing the resolved IPs, net.Dial can be used again if it given an IP address and port number.

The comment to driver_test is simply a clarifying comment showing we're using our own asserts and not an imported module

CLAassistant commented 2 years ago

CLA assistant check
All committers have signed the CLA.