Skip to content

[BUG] cluster shards returns slots as strings, not integers #10680

@sjpotter

Description

@sjpotter

Describe the bug

When I run cluster shards on a build from the 7.0.0 tag, I get strings from slot values, not integers.

documentation is pretty clear that they should be integers https://redis.io/commands/cluster-shards/ (that also seems like it should be the right thing in general)

To reproduce

127.0.0.1:5001> cluster shards
1) 1) "slots"
   2) 1) "0"
      2) "16383"
   3) "nodes"
   4) 1)  1) "id"
          2) "4efebd0607d716c3f95e25598400a6f1fbd06d5b"
          3) "port"
          4) (integer) 5001
          5) "ip"
          6) ""
          7) "endpoint"
          8) ""
          9) "hostname"
         10) ""
         11) "role"
         12) "master"
         13) "replication-offset"
         14) (integer) 0
         15) "health"
         16) "online"

Expected behavior

0/16383 in slots array should be integers.

Additional information

build info Redis 7.0.0 (d375595/0) 64 bit

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions