Skip to content
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] [AIOps] Saved search selection causes pages to hang #166079

Closed
jgowdyelastic opened this issue Sep 8, 2023 · 1 comment · Fixed by #166934
Closed

[ML] [AIOps] Saved search selection causes pages to hang #166079

jgowdyelastic opened this issue Sep 8, 2023 · 1 comment · Fixed by #166934
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:ML/AIOps ML AIOps features: Change Point Detection, Log Pattern Analysis, Log Rate Analysis :ml v8.11.0

Comments

@jgowdyelastic
Copy link
Member

jgowdyelastic commented Sep 8, 2023

Log Rate Analysis and Log Pattern Analysis hang when using a saved search.
It appears an infinite refresh loop happens in one of the hooks which is common to both pages.
It could possibly be useData. I believe it is also related to the now-15mins default of the time picker.

@jgowdyelastic jgowdyelastic added bug Fixes for quality problems that affect the customer experience :ml Feature:ML/AIOps ML AIOps features: Change Point Detection, Log Pattern Analysis, Log Rate Analysis v8.11.0 labels Sep 8, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

@peteharverson peteharverson changed the title [ML] [AIOPs] Saved search selection causes [ML] [AIOps] Saved search selection causes pages to hang Sep 11, 2023
walterra added a commit that referenced this issue Sep 21, 2023
## Summary

Fixes #166079.

If a user picked a saved search to investigate, the log pattern analysis
page would freeze with an infinite render loop; the log rate analysis
pate wouldn't freeze but repeatedly query for new data.

This PR fixes the issue by memoizing the queries derived from the saved
search information to avoid it being a new instance every time.

### Checklist

- [x] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Sep 21, 2023
## Summary

Fixes elastic#166079.

If a user picked a saved search to investigate, the log pattern analysis
page would freeze with an infinite render loop; the log rate analysis
pate wouldn't freeze but repeatedly query for new data.

This PR fixes the issue by memoizing the queries derived from the saved
search information to avoid it being a new instance every time.

### Checklist

- [x] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

(cherry picked from commit fabaa2f)
kibanamachine added a commit that referenced this issue Sep 25, 2023
…#166956)

# Backport

This will backport the following commits from `main` to `8.10`:
- [[ML] AIOps: Fix render loop when using saved search.
(#166934)](#166934)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Walter
Rafelsberger","email":"walter.rafelsberger@elastic.co"},"sourceCommit":{"committedDate":"2023-09-21T15:28:38Z","message":"[ML]
AIOps: Fix render loop when using saved search. (#166934)\n\n##
Summary\r\n\r\nFixes #166079.\r\n\r\nIf a user picked a saved search to
investigate, the log pattern analysis\r\npage would freeze with an
infinite render loop; the log rate analysis\r\npate wouldn't freeze but
repeatedly query for new data.\r\n\r\nThis PR fixes the issue by
memoizing the queries derived from the saved\r\nsearch information to
avoid it being a new instance every time.\r\n\r\n### Checklist\r\n\r\n-
[x] This was checked for breaking API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"fabaa2f89ecc7737b744b1a352251dc654d564a8","branchLabelMapping":{"^v8.11.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix",":ml","Feature:ML/AIOps","v8.11.0","v8.10.3"],"number":166934,"url":"https://github.com/elastic/kibana/pull/166934","mergeCommit":{"message":"[ML]
AIOps: Fix render loop when using saved search. (#166934)\n\n##
Summary\r\n\r\nFixes #166079.\r\n\r\nIf a user picked a saved search to
investigate, the log pattern analysis\r\npage would freeze with an
infinite render loop; the log rate analysis\r\npate wouldn't freeze but
repeatedly query for new data.\r\n\r\nThis PR fixes the issue by
memoizing the queries derived from the saved\r\nsearch information to
avoid it being a new instance every time.\r\n\r\n### Checklist\r\n\r\n-
[x] This was checked for breaking API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"fabaa2f89ecc7737b744b1a352251dc654d564a8"}},"sourceBranch":"main","suggestedTargetBranches":["8.10"],"targetPullRequestStates":[{"branch":"main","label":"v8.11.0","labelRegex":"^v8.11.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/166934","number":166934,"mergeCommit":{"message":"[ML]
AIOps: Fix render loop when using saved search. (#166934)\n\n##
Summary\r\n\r\nFixes #166079.\r\n\r\nIf a user picked a saved search to
investigate, the log pattern analysis\r\npage would freeze with an
infinite render loop; the log rate analysis\r\npate wouldn't freeze but
repeatedly query for new data.\r\n\r\nThis PR fixes the issue by
memoizing the queries derived from the saved\r\nsearch information to
avoid it being a new instance every time.\r\n\r\n### Checklist\r\n\r\n-
[x] This was checked for breaking API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"fabaa2f89ecc7737b744b1a352251dc654d564a8"}},{"branch":"8.10","label":"v8.10.3","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Walter Rafelsberger <walter.rafelsberger@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:ML/AIOps ML AIOps features: Change Point Detection, Log Pattern Analysis, Log Rate Analysis :ml v8.11.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants