errose28 commented on code in PR #8603:
URL: https://github.com/apache/ozone/pull/8603#discussion_r2214434111
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/ozoneimpl/ContainerScanHelper.java:
##########
@@ -131,6 +132,23 @@ public void handleUnhealthyScanResult(long containerID,
ScanResult result) throw
if (containerMarkedUnhealthy) {
metrics.incNumUnHealthyContainers();
}
+ // triggering a volume scan for the unhealthy container
+ triggerVolumeScan(containerData);
Review Comment:
I'm thinking we should only do this if `containerMarkedUnhealthy == true`.
With reconciliation we will now scan containers that were already unhealthy. I
don't think we need new volume scans each time the same unhealthy container
shows up.
##########
hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/ozoneimpl/TestBackgroundContainerDataScanner.java:
##########
@@ -133,6 +136,16 @@ public void testUnhealthyContainersDetected() throws
Exception {
verifyContainerMarkedUnhealthy(deletedContainer, never());
}
+ @Test
+ @Override
+ public void testUnhealthyContainersTriggersVolumeScan() throws Exception {
+ try (MockedStatic<StorageVolumeUtil> mockedStatic =
mockStatic(StorageVolumeUtil.class)) {
Review Comment:
I see. Between the current implementation and mock static I think mock
static is actually cleaner. Can we revert back to that version?
--
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]