Unverified Commit 4031a187 authored by Binbin's avatar Binbin Committed by GitHub
Browse files

Fix that slot return in CLUSTER SHARDS should be integer (#12561)

An unintentional change was introduced in #10536, we used
to use addReplyLongLong and now it is addReplyBulkLonglong, 
revert it back the previous behavior.
parent 96e9dec4
...@@ -5703,7 +5703,7 @@ void addShardReplyForClusterShards(client *c, list *nodes) { ...@@ -5703,7 +5703,7 @@ void addShardReplyForClusterShards(client *c, list *nodes) {
serverAssert((n->slot_info_pairs_count % 2) == 0); serverAssert((n->slot_info_pairs_count % 2) == 0);
addReplyArrayLen(c, n->slot_info_pairs_count); addReplyArrayLen(c, n->slot_info_pairs_count);
for (int i = 0; i < n->slot_info_pairs_count; i++) for (int i = 0; i < n->slot_info_pairs_count; i++)
addReplyBulkLongLong(c, (unsigned long)n->slot_info_pairs[i]); addReplyLongLong(c, (unsigned long)n->slot_info_pairs[i]);
} else { } else {
/* If no slot info pair is provided, the node owns no slots */ /* If no slot info pair is provided, the node owns no slots */
addReplyArrayLen(c, 0); addReplyArrayLen(c, 0);
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
"description": "an even number element array specifying the start and end slot numbers for slot ranges owned by this shard", "description": "an even number element array specifying the start and end slot numbers for slot ranges owned by this shard",
"type": "array", "type": "array",
"items": { "items": {
"type": "string" "type": "integer"
} }
}, },
"nodes": { "nodes": {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment