ozone
ozone copied to clipboard
HDDS-7091. Filter containers with pending deletion blocks before checking policy
What changes were proposed in this pull request?
Previously, containers with zero pending deletion blocks will also be sent to check container chosing policy, which is unnecessary. We can filter them out before passing to any policy.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-7091
How was this patch tested?
Manual tested with debug log added.
Before:
2022-08-04 14:14:23,725 [BlockDeletingService#8] INFO org.apache.hadoop.ozone.container.keyvalue.statemachine.background.BlockDeletingService: Found 57 candidates for bl
ock deletion
2022-08-04 14:14:23,725 [BlockDeletingService#8] INFO org.apache.hadoop.ozone.container.common.impl.TopNOrderedContainerDeletionChoosingPolicy: Container 128 has 0 pendi
ng deletion blocks
2022-08-04 14:14:23,725 [BlockDeletingService#8] INFO org.apache.hadoop.ozone.container.common.impl.TopNOrderedContainerDeletionChoosingPolicy: Stop looking for next con
tainer, there is no pending deletion block contained in remaining containers.
2022-08-04 14:14:23,725 [BlockDeletingService#8] INFO org.apache.hadoop.ozone.container.keyvalue.statemachine.background.BlockDeletingService: Found 0 containers for blo
ck deletion
After:
2022-08-04 20:07:55,288 [BlockDeletingService#2] INFO org.apache.hadoop.ozone.container.keyvalue.statemachine.background.BlockDeletingService: Found 0 containers with pending deletion blocks and allowed for deletion
@aswinshakil