You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2021/05/15 09:46:00 UTC

[GitHub] [ozone] JacksonYao287 commented on a change in pull request #2240: HDDS-5220 when datanode delete the data,first delete metadata,then delete chunk files

JacksonYao287 commented on a change in pull request #2240:
URL: https://github.com/apache/ozone/pull/2240#discussion_r632923544



##########
File path: hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/statemachine/background/BlockDeletingService.java
##########
@@ -432,6 +430,8 @@ public ContainerBackgroundTaskResult deleteViaSchema2(
               meta.getStore().getBlockDataTable().deleteWithBatch(batch, bID);
             }
           }
+          totalBlocks =
+              deleteTransactions(delBlocks, handler, blockDataTable, container);
           meta.getStore().getBatchHandler().commitBatchOperation(batch);

Review comment:
       thanks @cchenax for this work.
   but I think `meta.getStore().getBatchHandler().commitBatchOperation(batch);` is which the metadata is definitely be deleted, thus this should be executed before `deleteTransactions(delBlocks, handler, blockDataTable, container);` , so that we can make sure metadata is deleted before deleting the corresponding blocks.




-- 
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.

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