New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Display low disk watermark to be consistent with documentation #11313
Conversation
@dakrone please could you review |
@@ -413,7 +426,7 @@ public Decision canAllocate(ShardRouting shardRouting, RoutingNode node, Routing | |||
Strings.format1Decimals(freeDiskPercentage, "%"), node.nodeId()); | |||
} | |||
return allocation.decision(Decision.NO, NAME, "less than required [%s%%] free disk on node, free: [%s%%]", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this message needs to be changed now, since the first value is the "used" value now
@mkis- I left one comment, other than that this looks good to me, let me know when that is fixed and I will merge it in! |
@dakrone Thank you for your feedback. I changed the phrasing of messages around it for consistency. |
DiskThresholdDecider.this.freeBytesThresholdLow, usage); | ||
} | ||
|
||
// Check percentage disk values | ||
if (usage.getFreeDiskAsPercentage() < DiskThresholdDecider.this.freeDiskThresholdHigh) { | ||
logger.warn("high disk watermark [{} free] exceeded on {}, shards will be relocated away from this node", | ||
logger.warn("high disk watermark [{}] exceeded on {}, shards will be relocated away from this node", | ||
Strings.format1Decimals(DiskThresholdDecider.this.freeDiskThresholdHigh, "%"), usage); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this should be 100.0 - DiskThresholdDecider.this.freeDiskThresholdHigh
, just like below, right?
@mkis- left one more comment, looks like a missed |
documentaiton Change log entries, add convenience methods, unit tests Correct allocation decision messages to display used space Missed a word Correct displayed threshold value
@dakrone Made the change and squashed the commits. |
This PR is an attempted fix for Issue #10588. I have added altered log entries, so that messages involving disk usage percentages display used disk percentages, rather than free disk percentages.
Closes #10588