1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-29 17:41:15 +03:00

Use correct slot for COUNTKEYSINSLOT command (#3327)

This commit is contained in:
Bulat Khasanov
2025-04-16 18:32:57 +03:00
committed by GitHub
parent 7b9bd6c36e
commit e2149b06f7
2 changed files with 25 additions and 1 deletions

View File

@ -1856,7 +1856,7 @@ func (c *ClusterClient) cmdInfo(ctx context.Context, name string) *CommandInfo {
func (c *ClusterClient) cmdSlot(ctx context.Context, cmd Cmder) int {
args := cmd.Args()
if args[0] == "cluster" && args[1] == "getkeysinslot" {
if args[0] == "cluster" && (args[1] == "getkeysinslot" || args[1] == "countkeysinslot") {
return args[2].(int)
}