ptlrs commented on code in PR #8603:
URL: https://github.com/apache/ozone/pull/8603#discussion_r2196544372


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/ozoneimpl/ContainerScanHelper.java:
##########
@@ -107,6 +109,18 @@ public void handleUnhealthyScanResult(long containerID, 
ScanResult result) throw
     }
   }
 
+  public void triggerVolumeScan(ContainerData containerData) {
+    log.info("Triggering a volume scan for volume [{}] as unhealthy container 
[{}] was on it.",
+        containerData.getVolume().getStorageDir().getPath(), 
containerData.getContainerID());
+    HddsVolume volume = containerData.getVolume();

Review Comment:
   If `containerData` or `containerData.getVolume()` is null, 
   `containerData.getVolume().getStorageDir()` can throw a NPE.
   
   The null check for `volume` should happen before the log line.



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