| 4061 | } |
| 4062 | |
| 4063 | void clusterManagerPrintSlotsList(list *slots) { |
| 4064 | clusterManagerNode n = {0}; |
| 4065 | listIter li; |
| 4066 | listNode *ln; |
| 4067 | listRewind(slots, &li); |
| 4068 | while ((ln = listNext(&li)) != NULL) { |
| 4069 | int slot = atoi(ln->value); |
| 4070 | if (slot >= 0 && slot < CLUSTER_MANAGER_SLOTS) |
| 4071 | n.slots[slot] = 1; |
| 4072 | } |
| 4073 | sds nodeslist = clusterManagerNodeSlotsString(&n); |
| 4074 | printf("%s\n", nodeslist); |
| 4075 | sdsfree(nodeslist); |
| 4076 | } |
| 4077 | |
| 4078 | /* Return the node, among 'nodes' with the greatest number of keys |
| 4079 | * in the specified slot. */ |
no test coverage detected