nandakumar131 commented on code in PR #8465: URL: https://github.com/apache/ozone/pull/8465#discussion_r2093202078
########## hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/block/DeletedBlockLogImpl.java: ########## @@ -326,24 +325,20 @@ public void addTransactions(Map<Long, List<Long>> containerBlocksMap) } @Override - public void close() throws IOException { + public void close() { } private void getTransaction(DeletedBlocksTransaction tx, DatanodeDeletedBlockTransactions transactions, Set<DatanodeDetails> dnList, Set<ContainerReplica> replicas, Review Comment: It seems the `dnList` is never used inside this method, this can be removed. ########## hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/block/DeletedBlockLogImpl.java: ########## @@ -326,24 +325,20 @@ public void addTransactions(Map<Long, List<Long>> containerBlocksMap) } @Override - public void close() throws IOException { + public void close() { } private void getTransaction(DeletedBlocksTransaction tx, DatanodeDeletedBlockTransactions transactions, Set<DatanodeDetails> dnList, Set<ContainerReplica> replicas, - Map<UUID, Map<Long, CmdStatus>> commandStatus) { - DeletedBlocksTransaction updatedTxn = - DeletedBlocksTransaction.newBuilder(tx) - .setCount(transactionStatusManager.getOrDefaultRetryCount( - tx.getTxID(), 0)) - .build(); - + Map<DatanodeID, Map<Long, CmdStatus>> commandStatus) { for (ContainerReplica replica : replicas) { - DatanodeDetails details = replica.getDatanodeDetails(); - if (!transactionStatusManager.isDuplication( - details, updatedTxn.getTxID(), commandStatus)) { - transactions.addTransactionToDN(details.getID(), updatedTxn); + final DatanodeID datanodeID = replica.getDatanodeDetails().getID(); + if (!transactionStatusManager.isDuplication(datanodeID, tx.getTxID(), commandStatus)) { + final DeletedBlocksTransaction updatedTxn = DeletedBlocksTransaction.newBuilder(tx) + .setCount(transactionStatusManager.getRetryCount(tx.getTxID())) + .build(); Review Comment: This was outside the `for` loop before this change, will moving it inside `for` loop have any performance impact? -- 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