I needed 2 locks. One to lock the usage of fillPool and prevent multiple fillPool executions interleaving. The other locks through out are because I am accessing the clusterImpl variables and need locks in those sections.

Again I could of locked the whole method and connected in seperate go routines but I would lose the benefit of connecting to a host with a single connection before spawning the rest of the connections and in the event the function is called in an existing go rountine when it returns it is guaranteeded to have atleast 1 connection in the pool to execute the query against if the cluster is accessible by the application.