ChenSammi commented on code in PR #9954:
URL: https://github.com/apache/ozone/pull/9954#discussion_r2992604990
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/volume/StorageVolumeChecker.java:
##########
@@ -376,10 +399,22 @@ public void onFailure(@Nonnull Throwable t) {
volume, exception);
// If the scan was interrupted, do not count it as a volume failure.
// This should only happen if the volume checker is being shut down.
- if (!(t instanceof InterruptedException)) {
- markFailed();
- cleanup();
+ if (t instanceof InterruptedException) {
+ return;
+ }
+ if (exception instanceof TimeoutException) {
+ // Per-check timeout from ThrottledAsyncChecker: apply the same
+ // IO-failure tolerance as a failed read/write test, rather than
+ // failing the volume immediately on the first timeout.
+ if (!volume.recordTimeoutAsIOFailure()) {
+ // Within tolerance this round. Still call cleanup() so numVolumes
+ // decrements correctly and the latch/callback fires on time.
+ cleanup();
Review Comment:
one of the callback of checkVolume is
```
volumeChecker.checkVolume(
volume, (healthyVolumes, failedVolumes) -> {
if (!failedVolumes.isEmpty()) {
LOG.warn("checkVolumeAsync callback got {} failed volumes: {}",
failedVolumes.size(), failedVolumes);
} else {
LOG.debug("checkVolumeAsync: no volume failures detected");
}
handleVolumeFailures(failedVolumes);
})
```
We need to consider whether call the cleanup in this case.
--
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]