You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "swamirishi (via GitHub)" <gi...@apache.org> on 2023/01/27 19:01:19 UTC

[GitHub] [ozone] swamirishi commented on a diff in pull request #3655: HDDS-7091. Filter containers with pending deletion blocks before checking policy

swamirishi commented on code in PR #3655:
URL: https://github.com/apache/ozone/pull/3655#discussion_r1089316753


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/statemachine/background/BlockDeletingService.java:
##########
@@ -180,6 +180,8 @@ public List<ContainerBlockInfo> chooseContainerForBlockDeletion(
       throws StorageContainerException {
     Map<Long, ContainerData> containerDataMap =
         ozoneContainer.getContainerSet().getContainerMap().entrySet().stream()
+            .filter(e -> ((KeyValueContainerData) e.getValue()
+                .getContainerData()).getNumPendingDeletionBlocks() > 0)

Review Comment:
   NIT: I believe this should not be done it is true currently only BlockDeletingService is calling the function but if there is some other implementation it would ending up doing the calculation anyways. But this should also be fine.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org