ChenSammi commented on code in PR #8843:
URL: https://github.com/apache/ozone/pull/8843#discussion_r3007781558
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/DatanodeConfiguration.java:
##########
@@ -688,6 +706,23 @@ public void validate() {
diskCheckTimeout = DISK_CHECK_TIMEOUT_DEFAULT;
}
+ if (diskCheckSlidingWindowTimeout.isNegative()) {
+ LOG.warn("{} must be greater than zero and was set to {}. Defaulting to
{}",
+ DISK_CHECK_SLIDING_WINDOW_TIMEOUT_KEY, diskCheckSlidingWindowTimeout,
+ DISK_CHECK_SLIDING_WINDOW_TIMEOUT_DEFAULT);
+ diskCheckSlidingWindowTimeout =
DISK_CHECK_SLIDING_WINDOW_TIMEOUT_DEFAULT;
+ }
+
+ // Do not set window timeout <= periodic disk check interval period, or
failures can be missed across sparse checks
+ // e.g., every 120m interval with a 60m window rarely accumulates enough
failed events
+ if
(diskCheckSlidingWindowTimeout.compareTo(Duration.ofMinutes(periodicDiskCheckIntervalMinutes))
< 0) {
+ LOG.warn("{} must be greater than or equal to {} minutes and was set to
{} minutes. Defaulting to {}",
+ DISK_CHECK_SLIDING_WINDOW_TIMEOUT_KEY,
periodicDiskCheckIntervalMinutes,
+ diskCheckSlidingWindowTimeout.toMinutes(),
+
DurationFormatUtils.formatDurationHMS(DISK_CHECK_SLIDING_WINDOW_TIMEOUT_DEFAULT.toMillis()));
+ diskCheckSlidingWindowTimeout =
DISK_CHECK_SLIDING_WINDOW_TIMEOUT_DEFAULT;
Review Comment:
Instead of set diskCheckSlidingWindowTimeout to static
DISK_CHECK_SLIDING_WINDOW_TIMEOUT_DEFAULT, how about set
diskCheckSlidingWindowTimeout to
Duration.ofMinutes(periodicDiskCheckInterval).plus(diskCheckTimeout)?
Same for above diskCheckSlidingWindowTimeout negative check.
--
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]