mirror of
https://github.com/redis/go-redis.git
synced 2025-07-31 05:04:23 +03:00
ring: return an error in pipeline when all shards are down.
This commit is contained in:
3
ring.go
3
ring.go
@ -298,6 +298,9 @@ func (pipe *RingPipeline) Exec() (cmds []Cmder, retErr error) {
|
||||
name := pipe.ring.hash.Get(hashKey(cmd.clusterKey()))
|
||||
if name == "" {
|
||||
cmd.setErr(errRingShardsDown)
|
||||
if retErr == nil {
|
||||
retErr = errRingShardsDown
|
||||
}
|
||||
continue
|
||||
}
|
||||
cmdsMap[name] = append(cmdsMap[name], cmd)
|
||||
|
Reference in New Issue
Block a user