errose28 commented on code in PR #4384:
URL: https://github.com/apache/ozone/pull/4384#discussion_r1134928250


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/commandhandler/DeleteBlocksCommandHandler.java:
##########
@@ -482,23 +478,19 @@ private void updateMetaData(KeyValueContainerData 
containerData,
     }
   }
 
-  private boolean isTxnIdValid(long containerId,
+  private void logDeleteTransaction(long containerId,
       KeyValueContainerData containerData, DeletedBlocksTransaction delTX) {
-    boolean b = true;
     if (LOG.isDebugEnabled()) {
-      LOG.debug("Processing Container : {}, DB path : {}", containerId,
-          containerData.getMetadataPath());
+      LOG.debug("Processing Container : {}, DB path : {}, transaction {}",
+          containerId, containerData.getMetadataPath(), delTX.getTxID());
     }
 
     if (delTX.getTxID() <= containerData.getDeleteTransactionId()) {
-      if (LOG.isDebugEnabled()) {
-        LOG.debug(String.format("Ignoring delete blocks for containerId: %d."
-                + " Outdated delete transactionId %d < %d", containerId,
-            delTX.getTxID(), containerData.getDeleteTransactionId()));
-      }
-      b = false;
+      LOG.info(String.format("Delete blocks for containerId: %d"
+              + " is outdated, either received out of order or retried,"
+              + " %d < %d", containerId, delTX.getTxID(),
+          containerData.getDeleteTransactionId()));

Review Comment:
   Suggest changing log message to have `<=` to match the condition being 
checked, and removing "outdated" since it may not be outdated if the deletes 
were received out of order.
   ```suggestion
         LOG.info(String.format("Delete blocks for containerId: %d"
                 + " is either received out of order or retried,"
                 + " %d <= %d", containerId, delTX.getTxID(),
             containerData.getDeleteTransactionId()));
   ```



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