mirror of
https://github.com/redis/go-redis.git
synced 2025-07-28 06:42:00 +03:00
cluster: optimize newClusterState
This commit is contained in:
@ -49,7 +49,7 @@ func (c *ClusterClient) Nodes(key string) ([]*clusterNode, error) {
|
||||
}
|
||||
|
||||
slot := hashtag.Slot(key)
|
||||
nodes := state.slots[slot]
|
||||
nodes := state.slotNodes(slot)
|
||||
if len(nodes) != 2 {
|
||||
return nil, fmt.Errorf("slot=%d does not have enough nodes: %v", slot, nodes)
|
||||
}
|
||||
|
Reference in New Issue
Block a user