hanishakoneru commented on a change in pull request #3034: URL: https://github.com/apache/ozone/pull/3034#discussion_r807096876
########## File path: hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/statemachine/background/BlockDeletingService.java ########## @@ -435,33 +449,45 @@ public ContainerBackgroundTaskResult deleteViaSchema2( meta.getStore().getBlockDataTable().deleteWithBatch(batch, bID); } } + + // Handler.deleteBlock calls deleteChunk to delete all the chunks + // in the block. The ContainerData stats (DB and in-memory) are not + // updated with decremented used bytes during deleteChunk. This is + // done here so that all the DB update for block delete can be + // batched together while committing to DB. meta.getStore().getBatchHandler().commitBatchOperation(batch); containerData.updateAndCommitDBCounters(meta, batch, - totalBlocks); - // update count of pending deletion blocks and block count in - // in-memory container status. - containerData.decrPendingDeletionBlocks(totalBlocks); - containerData.decrKeyCount(totalBlocks); + deletedBlocksCount, releasedBytes); Review comment: Thanks for catching this Ethan. I have removed it. -- 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-unsubscr...@ozone.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@ozone.apache.org For additional commands, e-mail: issues-h...@ozone.apache.org