fixed issue on cluster re-balancing
@@ -154,6 +154,10 @@ public class ODefaultClusterOwnershipAssignmentStrategy implements OClusterOwner
if (targetClustersPerNode == 0 || (nodesLeft > 0 && (clusterNames.size() - clusterAssigned) % nodesLeft > 0))
targetClustersPerNode++;
+ if (targetClustersPerNode < 0) {
+ targetClustersPerNode = 0;
+ }
+
if (ownedClusters.size() > targetClustersPerNode) {
// REMOVE CLUSTERS IF THERE IS NO STATIC CFG OF THE OWNER
while (ownedClusters.size() > targetClustersPerNode) {
