Delete all the slots associated with the specified node. * The number of deleted slots is returned. */
| 3905 | /* Delete all the slots associated with the specified node. |
| 3906 | * The number of deleted slots is returned. */ |
| 3907 | int clusterDelNodeSlots(clusterNode *node) { |
| 3908 | int deleted = 0, j; |
| 3909 | |
| 3910 | for (j = 0; j < CLUSTER_SLOTS; j++) { |
| 3911 | if (clusterNodeGetSlotBit(node,j)) { |
| 3912 | clusterDelSlot(j); |
| 3913 | deleted++; |
| 3914 | } |
| 3915 | } |
| 3916 | return deleted; |
| 3917 | } |
| 3918 | |
| 3919 | /* Clear the migrating / importing state for all the slots. |
| 3920 | * This is useful at initialization and when turning a master into slave. */ |
no test coverage detected