Xushaohong commented on code in PR #3814:
URL: https://github.com/apache/ozone/pull/3814#discussion_r990885110
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/statemachine/background/BlockDeletingService.java:
##########
@@ -489,10 +488,11 @@ private ContainerBackgroundTaskResult
deleteViaTransactionStore(
Handler handler = Objects.requireNonNull(ozoneContainer.getDispatcher()
.getHandler(container.getContainerType()));
- Pair<Integer, Long> deleteBlocksResult =
+ DeleteTransactionStats deleteBlocksResult =
deleteTransactions(delBlocks, handler, blockDataTable, container);
- int deletedBlocksCount = deleteBlocksResult.getLeft();
- long releasedBytes = deleteBlocksResult.getRight();
+ int deletedBlocksProceeded = deleteBlocksResult.getBlocksProcessed();
Review Comment:
If we delete Txn, all blocks in the TXN will be processed, but part of them
may not be recorded in the DB and thus those shall not be counted as deleted,
only processed.
Only the blocks which successfully go through putBlock request and are
recorded in DB should be counted as deleted here to ensure the block count
calculation right.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]