mirror of
https://github.com/redis/go-redis.git
synced 2025-07-29 17:41:15 +03:00
fix: Fixed issue with context cancelled error leading to connection spikes on Primary instances (#3190)
* fix: Fixed issue with context cancelled error leading to connection spikes on Master * fix: Added tests * fix: Updated tests --------- Co-authored-by: Bhargav Dodla <bdodla@expediagroup.com> Co-authored-by: Nedyalko Dyakov <nedyalko.dyakov@gmail.com>
This commit is contained in:
@ -1350,7 +1350,9 @@ func (c *ClusterClient) processPipelineNode(
|
||||
_ = node.Client.withProcessPipelineHook(ctx, cmds, func(ctx context.Context, cmds []Cmder) error {
|
||||
cn, err := node.Client.getConn(ctx)
|
||||
if err != nil {
|
||||
node.MarkAsFailing()
|
||||
if !isContextError(err) {
|
||||
node.MarkAsFailing()
|
||||
}
|
||||
_ = c.mapCmdsByNode(ctx, failedCmds, cmds)
|
||||
setCmdsErr(cmds, err)
|
||||
return err
|
||||
|
Reference in New Issue
Block a user