You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "ChenSammi (via GitHub)" <gi...@apache.org> on 2023/09/08 10:10:45 UTC
[GitHub] [ozone] ChenSammi commented on a diff in pull request #5149: HDDS-9107. Reduce the granularity of Container locks for BlockDeletingService
ChenSammi commented on code in PR #5149:
URL: https://github.com/apache/ozone/pull/5149#discussion_r1319661474
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/statemachine/background/BlockDeletingTask.java:
##########
@@ -112,6 +118,25 @@ public int getSize() {
@Override
public BackgroundTaskResult call() throws Exception {
+ ContainerBackgroundTaskResult result =
+ new ContainerBackgroundTaskResult();
+ while (blocksToDelete > 0) {
+ ContainerBackgroundTaskResult crr = handleDeleteTask();
+ blocksToDelete -= crr.getSize();
+ result.addAll(crr.getDeletedBlocks());
+ if (blocksToDelete > 0 && crr.getSize() == 0) {
Review Comment:
Please move this check ahead, follow the handleDeleteTask call.
--
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