-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[ML] Fix race condition when updating data grid row count #149518
Merged
Merged
Conversation
This file contains 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
walterra
added
bug
Fixes for quality problems that affect the customer experience
:ml
release_note:skip
Skip the PR/issue when compiling release notes
v8.7.0
labels
Jan 25, 2023
walterra
force-pushed
the
ml-data-grid-fix-row-count
branch
from
January 25, 2023 14:37
0617bda
to
2366558
Compare
Pinging @elastic/ml-ui (:ml) |
jgowdyelastic
approved these changes
Jan 26, 2023
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
Code LGTM 🎉 |
qn895
approved these changes
Jan 26, 2023
💚 Build Succeeded
Metrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: cc @walterra |
kqualters-elastic
pushed a commit
to kqualters-elastic/kibana
that referenced
this pull request
Feb 6, 2023
…9518) This fixes an edges case where handling the row count information (the actual count and the relation (`eq/gte`)) could trigger two independent state updates. Because of those multiple state updates the check whether to show the mini histograms by default could fail. For example updating from `count: 0, relation: eq` to `count: 10000, relation: gte` could cause an intermediate state `count: 10000, relation, eq` which would pass the check to show the mini charts. The fix here is to combine the two settings to use only one `useState()`.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
backport:skip
This commit does not require backporting
bug
Fixes for quality problems that affect the customer experience
:ml
release_note:skip
Skip the PR/issue when compiling release notes
v8.7.0
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.
Summary
Part of #71231.
This fixes an edges case where handling the row count information (the actual count and the relation (
eq/gte
)) could trigger two independent state updates. Because of those multiple state updates the check whether to show the mini histograms by default could fail. For example updating fromcount: 0, relation: eq
tocount: 10000, relation: gte
could cause an intermediate statecount: 10000, relation, eq
which would pass the check to show the mini charts.The fix in this PR is to combine the two settings to use only one
useState()
.Functional tests that would catch this bug are part of the date picker update for transforms (#149049), I'm just breaking this fix out into a separate PR for to make reviewing easier/more focused.
Checklist