Details
-
Sub-task
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
-
Reviewed
Description
When there are replicas of a block on a decommissioned node, BlockPlacementStatusWithUpgradeDomain#isUpgradeDomainPolicySatisfied returns false when it should return true. This is because numberOfReplicas is the number of in-service replicas for the block and upgradeDomains.size() is the number of upgrade domains across all replicas of the block. Specifically, we hit this scenario when numberOfReplicas is equal to upgradeDomainFactor and upgradeDomains.size() is greater than numberOfReplicas.
private boolean isUpgradeDomainPolicySatisfied() { if (numberOfReplicas <= upgradeDomainFactor) { return (numberOfReplicas == upgradeDomains.size()); } else { return upgradeDomains.size() >= upgradeDomainFactor; } }