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


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/block/DeletedBlockLogStateManagerImpl.java:
##########
@@ -181,6 +220,27 @@ public int 
resetRetryCountOfTransactionInDB(ArrayList<Long> txIDs)
     return 0;
   }
 
+  @Override
+  public ArrayList<DeletedBlocksTransaction> 
getTransactionsFromDB(ArrayList<Long> txIDs) throws IOException {
+    Objects.requireNonNull(txIDs, "txIds cannot be null.");
+    ArrayList<DeletedBlocksTransaction> transactions = new ArrayList<>();
+    for (long txId: txIDs) {
+      try {
+        DeletedBlocksTransaction transaction = deletedTable.get(txId);
+        if (transaction == null) {
+          LOG.debug("txId {} is not found in deletedTable.", txId);
+          continue;
+        }
+        transactions.add(transaction);
+      } catch (IOException ex) {
+        LOG.error("Could not get deleted block transaction {}.", txId, ex);
+        throw ex;
+      }
+    }
+    LOG.debug("Get {} DeletedBlocksTransactions for {} input txIDs", 
transactions.size(), txIDs.size());
+    return transactions;

Review Comment:
   I missed check deletingTxIDs for these transactions. Priyesh, can you add 
the check?  



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