Skip to content

Commit 03376a5

Browse files
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.
1 parent 9c34c53 commit 03376a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cluster.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1212,7 +1212,7 @@ func (c *ClusterClient) pipelineReadCmds(
12121212
continue
12131213
}
12141214

1215-
if c.opt.ReadOnly && isLoadingError(err) {
1215+
if c.opt.ReadOnly && (isLoadingError(err) || !isRedisError(err)) {
12161216
node.MarkAsFailing()
12171217
return err
12181218
}

0 commit comments

Comments
 (0)