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

Function clusterManagerPrintSlotsList

app/redis-6.2.6/src/redis-cli.c:4585–4598  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4583}
4584
4585static void clusterManagerPrintSlotsList(list *slots) {
4586 clusterManagerNode n = {0};
4587 listIter li;
4588 listNode *ln;
4589 listRewind(slots, &li);
4590 while ((ln = listNext(&li)) != NULL) {
4591 int slot = atoi(ln->value);
4592 if (slot >= 0 && slot < CLUSTER_MANAGER_SLOTS)
4593 n.slots[slot] = 1;
4594 }
4595 sds nodeslist = clusterManagerNodeSlotsString(&n);
4596 printf("%s\n", nodeslist);
4597 sdsfree(nodeslist);
4598}
4599
4600/* Return the node, among 'nodes' with the greatest number of keys
4601 * in the specified slot. */

Callers 1

Calls 5

listRewindFunction · 0.85
listNextFunction · 0.85
sdsfreeFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected