dkropachev commented on code in PR #1886:
URL: 
https://github.com/apache/cassandra-gocql-driver/pull/1886#discussion_r2122013823


##########
host_source.go:
##########
@@ -752,9 +752,14 @@ func refreshRing(r *ringDescriber) error {
                return err
        }
 
+       hostMap := make(map[string]*HostInfo, len(hosts))
+       for _, host := range hosts {
+               hostMap[host.HostID()] = host
+       }
+

Review Comment:
   I don't think this solution is straighforward, it relays on the fact that 
`r.GetHosts()` provides hosts in the certain order, if that order changes it 
stop working.
   It would be better to update `GetHosts` to ignore hosts that are already in 
the list



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org
For additional commands, e-mail: pr-h...@cassandra.apache.org

Reply via email to