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


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueContainerCheck.java:
##########
@@ -398,9 +396,7 @@ private void loadContainerData() throws IOException {
   }
 
   private void handleCorruption(IOException e) {
-    String errStr =
-        "Corruption detected in container: [" + containerID + "] ";
-    String logMessage = errStr + "Exception: [" + e.getMessage() + "]";
-    LOG.error(logMessage);
+    LOG.error("Marking Container [{}] UNHEALTHY as it failed metadata check." +
+                    " Exception: {}", containerID, e);

Review Comment:
   ```suggestion
       LOG.error("Corruption detected in container [{}]. Marking it 
UNHEALTHY.", containerID, e);
   ```
   
   Technically the metadata or the data (the actual blocks) may have been 
corrupted when this method is called. The exception should tell us which one it 
is. Also we can let the logger handle the exception printing directly without 
needing to pass it as a string format arg.



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