MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / getSlotOrReply

Function getSlotOrReply

src/cluster.cpp:4403–4413  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4401}
4402
4403int getSlotOrReply(client *c, robj *o) {
4404 long long slot;
4405
4406 if (getLongLongFromObject(o,&slot) != C_OK ||
4407 slot < 0 || slot >= CLUSTER_SLOTS)
4408 {
4409 addReplyError(c,"Invalid or out of range slot");
4410 return -1;
4411 }
4412 return (int) slot;
4413}
4414
4415void addNodeReplyForClusterSlot(client *c, clusterNode *node, int start_slot, int end_slot) {
4416 int i, nested_elements = 3; /* slots (2) + master addr (1) */

Callers 1

clusterCommandFunction · 0.85

Calls 2

getLongLongFromObjectFunction · 0.85
addReplyErrorFunction · 0.85

Tested by

no test coverage detected