1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-16 13:21:51 +03:00

fix(osscluster): typo

This commit is contained in:
Nedyalko Dyakov
2025-06-24 09:30:25 +03:00
parent 2bbcdaa32b
commit ecc985b75b

View File

@ -1583,15 +1583,15 @@ func (c *ClusterClient) processTxPipeline(ctx context.Context, cmds []Cmder) err
func (c *ClusterClient) slottedKeyedCommands(cmds []Cmder) map[int][]Cmder { func (c *ClusterClient) slottedKeyedCommands(cmds []Cmder) map[int][]Cmder {
cmdsSlots := map[int][]Cmder{} cmdsSlots := map[int][]Cmder{}
prefferedRandomSlot := -1 preferredRandomSlot := -1
for _, cmd := range cmds { for _, cmd := range cmds {
if cmdFirstKeyPos(cmd) == 0 { if cmdFirstKeyPos(cmd) == 0 {
continue continue
} }
slot := c.cmdSlot(cmd, prefferedRandomSlot) slot := c.cmdSlot(cmd, preferredRandomSlot)
if prefferedRandomSlot == -1 { if preferredRandomSlot == -1 {
prefferedRandomSlot = slot preferredRandomSlot = slot
} }
cmdsSlots[slot] = append(cmdsSlots[slot], cmd) cmdsSlots[slot] = append(cmdsSlots[slot], cmd)