Handle indices with zero/missing uptime correctly in write-load calculation#136929
Merged
nicktindall merged 8 commits intoelastic:mainfrom Oct 22, 2025
Merged
Conversation
nicktindall
commented
Oct 22, 2025
| if (someIndicesHadUptime) { | ||
| assertThat(forecastedWriteLoad.getAsDouble(), not(notANumber())); | ||
| } | ||
| } |
Contributor
Author
There was a problem hiding this comment.
Could probably have tested this by calling forecastIndexWriteLoad directly (it's exposed for testing). Happy to do that instead if we want to reduce the boilerplate.
Collaborator
|
Hi @nicktindall, I've created a changelog YAML for you. |
Collaborator
|
Pinging @elastic/es-distributed-coordination (Team:Distributed Coordination) |
ywangd
approved these changes
Oct 22, 2025
| // that index. It should be safe to extrapolate our weighted average out to the | ||
| // maximum uptime observed, based on the assumption that write-load is roughly | ||
| // evenly distributed across shards of a datastream index. | ||
| assert Double.isNaN(weightedAverageShardWriteLoad) == false : "Invalid average shard write load"; |
Member
There was a problem hiding this comment.
Nit: maybe Double.isFinite instead?
Contributor
Author
There was a problem hiding this comment.
I changed these assertions to assert on the two values we are adding to the overall totals, please re-check. I think this is a better approach as it's more agnostic of how they are calculated.
See d59c122
Contributor
Author
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
nicktindall
added a commit
to nicktindall/elasticsearch
that referenced
this pull request
Oct 22, 2025
…lation (elastic#136929) Fixes: ES-13286 (cherry picked from commit 2e340de)
fzowl
pushed a commit
to voyage-ai/elasticsearch
that referenced
this pull request
Nov 3, 2025
…lation (elastic#136929) Fixes: ES-13286
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.
This caused an incident in QA, we will continue to investigate WHY an index might be missing uptime/write load for all shards, but this should protect against it if/when it happens again.
Fixes: ES-13286