1
0
mirror of https://github.com/redis/go-redis.git synced 2025-08-07 12:42:55 +03:00

Reduce number of allocations.

This commit is contained in:
Vladimir Mihailenco
2017-01-13 13:39:59 +02:00
parent b9cc17bae0
commit 69554c0ec5
11 changed files with 158 additions and 92 deletions

View File

@@ -378,7 +378,7 @@ func (c *ClusterClient) cmdSlotAndNode(state *clusterState, cmd Cmder) (int, *cl
return 0, node, err
}
cmdInfo := c.cmds[cmd.arg(0)]
cmdInfo := c.cmds[cmd.name()]
firstKey := cmd.arg(cmdFirstKeyPos(cmd, cmdInfo))
slot := hashtag.Slot(firstKey)