Skip to content

Commit

Permalink
Return last error if can't retry on more hosts (apache#1213)
Browse files Browse the repository at this point in the history
* Return last error if can't retry on more hosts
  • Loading branch information
beltran authored and alourie committed Oct 11, 2018
1 parent aa46e85 commit 2d1883b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions query_executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,10 @@ func (q *queryExecutor) run(qry ExecutableQuery, specWG *sync.WaitGroup, results
case RetryNextHost:
// retry on the next host
selectedHost = hostIter()
if selectedHost == nil {
results <- queryResponse{iter: iter}
return
}
continue
default:
// Undefined? Return nil and error, this will panic in the requester
Expand Down

0 comments on commit 2d1883b

Please sign in to comment.