[8.x] OsStats must be lenient with bad data from older nodes#73610
Merged
williamrandolph merged 4 commits intoelastic:masterfrom Jun 1, 2021
Merged
[8.x] OsStats must be lenient with bad data from older nodes#73610williamrandolph merged 4 commits intoelastic:masterfrom
williamrandolph merged 4 commits intoelastic:masterfrom
Conversation
Collaborator
|
Pinging @elastic/es-core-infra (Team:Core/Infra) |
This was referenced Jun 1, 2021
rjernst
reviewed
Jun 1, 2021
Member
rjernst
left a comment
There was a problem hiding this comment.
The approach seems good to me, but can you please link the relevant PRs?
| assert this.free >= 0 : "expected free swap to be positive, got: " + total; | ||
| } else { | ||
| // If we have a node in the cluster without the bug fix for | ||
| // negative memory values, we need to coerce negative values to 0 here. |
Member
There was a problem hiding this comment.
It would be good to have a link here to the relevant PR that added coercion, so a reader can verify the 7.8 boundary.
| assert free >= 0 : "expected free memory to be positive, got: " + total; | ||
| } else { | ||
| // If we have a node in the cluster without the bug fix for | ||
| // negative memory values, we need to coerce negative values to 0 here. |
Member
There was a problem hiding this comment.
It would be good to have a link here to the relevant PR that added coercion, so a reader can verify the 7.2 boundary.
Contributor
Author
|
@elasticmachine run elasticsearch-ci/bwc (the error was a timeout on an unrelated test) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We've had a series of bug fixes for cases where an
OsProbegives negative values, most often just-1, to theOsStatsclass. We added assertions to catch cases where we were initializingOsStatswith bad values. Unfortunately, these fixes turned to not be backwards-compatible. In this commit, we simply coerce bad values to 0 when data is coming from nodes that don't have the relevant bug fixes.Relevant PRs:
Fixes #73459