Fix DiskThresholdMonitor flood warning

The flood warning checks the wrong threshold, namely the high
watermark. This would impact any node for which the disk usage is above
the high watermark and below the flood stage watermark. This commit
fixes this so that it compares to the flood threshold.

Relates #26204
This commit is contained in:
Jason Tedor 2017-08-15 00:22:27 +09:00 committed by GitHub
parent fcd8483505
commit 685e35e0ae
1 changed files with 1 additions and 1 deletions

View File

@ -77,7 +77,7 @@ public class DiskThresholdMonitor extends AbstractComponent {
}
// Check percentage disk values
if (usage.getFreeDiskAsPercentage() < diskThresholdSettings.getFreeDiskThresholdHigh()) {
if (usage.getFreeDiskAsPercentage() < diskThresholdSettings.getFreeDiskThresholdFloodStage()) {
logger.warn("flood stage disk watermark [{}] exceeded on {}, all indices on this node will marked read-only",
Strings.format1Decimals(100.0 - diskThresholdSettings.getFreeDiskThresholdFloodStage(), "%"), usage);
} else if (usage.getFreeDiskAsPercentage() < diskThresholdSettings.getFreeDiskThresholdHigh()) {