MCPcopy Create free account
hub / github.com/F-Stack/f-stack / getSlotOrReply

Function getSlotOrReply

app/redis-6.2.6/src/cluster.c:4344–4354  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4342}
4343
4344int getSlotOrReply(client *c, robj *o) {
4345 long long slot;
4346
4347 if (getLongLongFromObject(o,&slot) != C_OK ||
4348 slot < 0 || slot >= CLUSTER_SLOTS)
4349 {
4350 addReplyError(c,"Invalid or out of range slot");
4351 return -1;
4352 }
4353 return (int) slot;
4354}
4355
4356void addNodeReplyForClusterSlot(client *c, clusterNode *node, int start_slot, int end_slot) {
4357 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