-
Notifications
You must be signed in to change notification settings - Fork 968
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
[Discover]Fix infinite loop cause discover hang #8082
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
opensearch-changeset-bot bot
added a commit
to Hailong-am/OpenSearch-Dashboards
that referenced
this pull request
Sep 9, 2024
Signed-off-by: Hailong Cui <ihailong@amazon.com>
4bc9428
to
176d17d
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8082 +/- ##
==========================================
- Coverage 60.58% 60.58% -0.01%
==========================================
Files 3738 3738
Lines 88670 88670
Branches 13782 13782
==========================================
- Hits 53725 53723 -2
- Misses 31661 31662 +1
- Partials 3284 3285 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
ruanyl
approved these changes
Sep 9, 2024
abbyhu2000
approved these changes
Sep 9, 2024
opensearch-trigger-bot bot
pushed a commit
that referenced
this pull request
Sep 10, 2024
* fix infinit loop cause discovery hang Signed-off-by: Hailong Cui <ihailong@amazon.com> * Changeset file for PR #8082 created/updated --------- Signed-off-by: Hailong Cui <ihailong@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> (cherry picked from commit 5aaa00c) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
opensearch-trigger-bot bot
pushed a commit
that referenced
this pull request
Sep 10, 2024
* fix infinit loop cause discovery hang Signed-off-by: Hailong Cui <ihailong@amazon.com> * Changeset file for PR #8082 created/updated --------- Signed-off-by: Hailong Cui <ihailong@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> (cherry picked from commit 5aaa00c) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
ruanyl
pushed a commit
that referenced
this pull request
Sep 10, 2024
* fix infinit loop cause discovery hang * Changeset file for PR #8082 created/updated --------- (cherry picked from commit 5aaa00c) Signed-off-by: Hailong Cui <ihailong@amazon.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
ruanyl
pushed a commit
that referenced
this pull request
Sep 10, 2024
* fix infinit loop cause discovery hang * Changeset file for PR #8082 created/updated --------- (cherry picked from commit 5aaa00c) Signed-off-by: Hailong Cui <ihailong@amazon.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
all-star-contributor
backport 2.x
backport 2.17
discover
for discover reinvent
discover-next
in-next
v2.17.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.
Description
Fix an infinite loop cause discover hang.
OpenSearch-Dashboards/src/plugins/discover/public/application/view_components/utils/use_index_pattern.ts
Lines 47 to 66 in cedba8e
From the url below, we can see indexPattern is empty string. Based on the logic above,
http://localhost:5601/app/data-explorer/discover#?_a=(discover:(columns:!(_source),isDirty:!f,sort:!()),metadata:(indexPattern:'',view:discover))&_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))
If
newId
is empty,indexPatternIdFromState
will be empty string, when line 64handleIndexPattern();
execute, it will go to same condition path and have infinite loop.Issues Resolved
#7626
Screenshot
Testing the changes
Changelog
Check List
yarn test:jest
yarn test:jest_integration