-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Remove sporadic min/max usage estimates from stats #59755
Remove sporadic min/max usage estimates from stats #59755
Conversation
Today `GET _nodes/stats/fs` includes `{least,most}_usage_estimate` fields for some nodes. These fields have rather strange semantics. They are only reported on the elected master and on nodes that have been the elected master since they were last restarted; when a node stops being the elected master these stats remain in place but we stop updating them so they may become arbitrarily stale. This means that these statistics are pretty meaningless and impossible to use correctly. Even if they were kept up to date they're never reported for data-only nodes anyway, despite the fact that data nodes are the ones where we care most about disk usage. The information needed to compute the path with the least/most available space is already provided in the rest the stats output, so we can treat the inclusion of these stats as a bug and fix it by simply removing them in this commit. Since these stats were always optional and mostly omitted (for opaque reasons) this is not considered a breaking change.
Pinging @elastic/es-core-features (:Core/Features/Stats) |
@@ -119,19 +120,6 @@ private long addLong(long current, long other) { | |||
return current + other; | |||
} | |||
|
|||
private double addDouble(double current, double other) { |
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.
Unrelated unused method
} | ||
|
||
public FsInfo stats() { | ||
return cache.getOrRefresh(); | ||
} | ||
|
||
private static FsInfo stats(FsProbe probe, FsInfo initialValue, Logger logger, @Nullable ClusterInfo clusterInfo) { |
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.
Unrelated but logger
was always the static field so no need to pass it in.
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.
LGTM
Thanks Yannick |
Today `GET _nodes/stats/fs` includes `{least,most}_usage_estimate` fields for some nodes. These fields have rather strange semantics. They are only reported on the elected master and on nodes that have been the elected master since they were last restarted; when a node stops being the elected master these stats remain in place but we stop updating them so they may become arbitrarily stale. This means that these statistics are pretty meaningless and impossible to use correctly. Even if they were kept up to date they're never reported for data-only nodes anyway, despite the fact that data nodes are the ones where we care most about disk usage. The information needed to compute the path with the least/most available space is already provided in the rest the stats output, so we can treat the inclusion of these stats as a bug and fix it by simply removing them in this commit. Since these stats were always optional and mostly omitted (for opaque reasons) this is not considered a breaking change.
Adjusts the version logic used for BWC and reinstates the BWC tests
Today
GET _nodes/stats/fs
includes{least,most}_usage_estimate
fields for some nodes. These fields have rather strange semantics. They
are only reported on the elected master and on nodes that have been the
elected master since they were last restarted; when a node stops being
the elected master these stats remain in place but we stop updating them
so they may become arbitrarily stale.
This means that these statistics are pretty meaningless and impossible
to use correctly. Even if they were kept up to date they're never
reported for data-only nodes anyway, despite the fact that data nodes
are the ones where we care most about disk usage. The information needed
to compute the path with the least/most available space is already
provided in the rest the stats output, so we can treat the inclusion of
these stats as a bug and fix it by simply removing them in this commit.
Since these stats were always optional and mostly omitted (for opaque
reasons) this is not considered a breaking change.