fix: additional node failures in clustered pipelined reads

This causes a node to be marked as failing if the client is in READONLY mode
and any error occurs that is either a LOADING error (existing behvaior) or
any non-redis error (e.g. connection error, timeout, etc.).  This prevents that
node from being tried again on the next attempt as usually non-redis errors are
a strong indication that that node is not operational or degraded in some way.
This commit is contained in:
Ben Keith 2022-07-07 14:42:57 -04:00
parent 9c34c5345f
commit 03376a5d9c
1 changed files with 1 additions and 1 deletions

View File

@ -1212,7 +1212,7 @@ func (c *ClusterClient) pipelineReadCmds(
continue
}
if c.opt.ReadOnly && isLoadingError(err) {
if c.opt.ReadOnly && (isLoadingError(err) || !isRedisError(err)) {
node.MarkAsFailing()
return err
}