ozone icon indicating copy to clipboard operation
ozone copied to clipboard

HDDS-7091. Filter containers with pending deletion blocks before checking policy

Open kaijchen opened this issue 3 years ago • 1 comments

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

kaijchen avatar Aug 04 '22 12:08 kaijchen

@aswinshakil

kerneltime avatar Aug 22 '22 16:08 kerneltime