joao-r-reis commented on code in PR #1793:
URL: 
https://github.com/apache/cassandra-gocql-driver/pull/1793#discussion_r1852222308


##########
query_executor.go:
##########
@@ -129,12 +145,13 @@ func (q *queryExecutor) executeQuery(qry ExecutableQuery) 
(*Iter, error) {
 func (q *queryExecutor) do(ctx context.Context, qry ExecutableQuery, hostIter 
NextHost) *Iter {
        selectedHost := hostIter()
        rt := qry.retryPolicy()
+       specifiedHost := qry.GetHost()
 
        var lastErr error
        var iter *Iter
        for selectedHost != nil {
                host := selectedHost.Info()
-               if host == nil || !host.IsUp() {
+               if (host == nil || !host.IsUp()) && specifiedHost == nil {
                        selectedHost = hostIter()
                        continue
                }

Review Comment:
   we should probably add another `if` here to exit right away if specified 
host is `!= nil` and the host is down



-- 
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