| 4583 | } |
| 4584 | |
| 4585 | static 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. */ |
no test coverage detected