Delete all the slots associated with the specified node. * The number of deleted slots is returned. */
| 3964 | /* Delete all the slots associated with the specified node. |
| 3965 | * The number of deleted slots is returned. */ |
| 3966 | int clusterDelNodeSlots(clusterNode *node) { |
| 3967 | int deleted = 0, j; |
| 3968 | |
| 3969 | for (j = 0; j < CLUSTER_SLOTS; j++) { |
| 3970 | if (clusterNodeGetSlotBit(node,j)) { |
| 3971 | clusterDelSlot(j); |
| 3972 | deleted++; |
| 3973 | } |
| 3974 | } |
| 3975 | return deleted; |
| 3976 | } |
| 3977 | |
| 3978 | /* Clear the migrating / importing state for all the slots. |
| 3979 | * This is useful at initialization and when turning a master into slave. */ |
no test coverage detected