Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.4.0
Description
According to the following javadoc, both decommission and maintenance replicas should be deprioritised:
/** * The weightedRedundancy, is the remaining redundancy + the requeue count. * When this value is used for ordering in a priority queue it ensures the * priority is reduced each time it is requeued, to prevent it from blocking * other containers from being processed. * Additionally, so that decommission and maintenance replicas are not * ordered ahead of under-replicated replicas, a redundancy of * DECOMMISSION_REDUNDANCY is used for the decommission redundancy rather * than its real redundancy. * @return The weightedRedundancy of this result. */ public int getWeightedRedundancy() { int result = requeueCount; if (dueToDecommission) { result += DECOMMISSION_REDUNDANCY; } else { result += getRemainingRedundancy(); } return result; }
but dueToDecommission=true is set only based on decommission replicas, ignoring maintenance replicas (maintenanceCount):
/** * Checks whether insufficient replication is because of some replicas * being on datanodes that were decommissioned. * @param includePendingAdd if pending adds should be considered * @return true if there is insufficient replication and it's because of * decommissioning. */ public boolean inSufficientDueToDecommission(boolean includePendingAdd) { if (isSufficientlyReplicated(includePendingAdd)) { return false; } int delta = redundancyDelta(true, includePendingAdd); return decommissionCount >= delta; }
Attachments
Issue Links
- links to