ChenSammi commented on code in PR #9954:
URL: https://github.com/apache/ozone/pull/9954#discussion_r2992492049


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/volume/StorageVolume.java:
##########
@@ -753,6 +728,65 @@ public synchronized VolumeCheckResult check(@Nullable 
Boolean unused)
     return VolumeCheckResult.HEALTHY;
   }
 
+  /**
+   * Called by {@link StorageVolumeChecker} when a volume check times out —
+   * either because the global {@code checkAllVolumes()} latch expired before
+   * this volume's async check completed, or because the per-check timeout
+   * inside {@link ThrottledAsyncChecker} fired.
+   *
+   * <p>Records a synthetic IO-test failure in the existing sliding window,
+   * making latch timeouts subject to the same {@code ioFailureTolerance}
+   * threshold as genuine read/write failures.  No separate configuration key
+   * is required: the existing
+   * {@code hdds.datanode.disk.check.io.failures.tolerated} governs both.
+   *
+   * <p>Recovery is automatic: each successful {@link #check} call records a
+   * {@code true} entry in the window, gradually evicting the synthetic
+   * failure once {@code ioTestCount} healthy results have accumulated.
+   *
+   * @return {@code true} if {@code currentIOFailureCount > 
ioFailureTolerance},
+   *         meaning the volume should now be marked FAILED; {@code false} if
+   *         the failure is still within tolerance this round.
+   */
+  public synchronized boolean recordTimeoutAsIOFailure() {

Review Comment:
   check is synchronized. So if timeout, check doesn't return, then this 
recordTimeoutAsIOFailure will wait for check to complete.  



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