ChenSammi commented on code in PR #9272:
URL: https://github.com/apache/ozone/pull/9272#discussion_r2532935097


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/block/SCMDeletedBlockTransactionStatusManager.java:
##########
@@ -489,20 +481,13 @@ public void removeTransactions(ArrayList<Long> txIDs) 
throws IOException {
         !disableDataDistributionForTest) {
       ArrayList<Long> txToQueryList = new ArrayList<>();
       for (Long txID: txIDs) {
-        if (txID >= firstTxIdForDataDistribution) {
-          TxBlockInfo txBlockInfo = txSizeMap.remove(txID);
-          if (txBlockInfo != null) {
-            // txBlockInfosToBeDeleted.add(txBlockInfo);
-            descDeletedBlocksSummary(txBlockInfo);
-            metrics.incrBlockDeletionTransactionSizeFromCache();
-          } else {
-            // Fetch the transaction from DB to get the size. This happens 
during
-            // 1. SCM leader transfer, deletion command send by one SCM,
-            //    while the deletion ack received by a different SCM
-            // 2. SCM restarts, txBlockInfoMap is empty, while receiving the 
deletion ack from DN
-            txToQueryList.add(txID);
-            metrics.incrBlockDeletionTransactionSizeFromDB();
-          }
+        TxBlockInfo txBlockInfo = txSizeMap.remove(txID);
+        if (txBlockInfo != null) {
+          // txBlockInfosToBeDeleted.add(txBlockInfo);
+          descDeletedBlocksSummary(txBlockInfo);
+          metrics.incrBlockDeletionTransactionSizeFromCache();
+        } else {
+          txToQueryList.add(txID);

Review Comment:
   This else branch is not needed too. 



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

Reply via email to