Skip to content

[Watcher] Prevent expensive queries on ES by using PointInTimeFinder to get indexPatterns#119717

Merged
sabarasaba merged 12 commits intoelastic:mainfrom
sabarasaba:watcher/use_pointInTimeFinder_to_improve_performance
Dec 3, 2021
Merged

[Watcher] Prevent expensive queries on ES by using PointInTimeFinder to get indexPatterns#119717
sabarasaba merged 12 commits intoelastic:mainfrom
sabarasaba:watcher/use_pointInTimeFinder_to_improve_performance

Conversation

@sabarasaba
Copy link
Copy Markdown
Member

@sabarasaba sabarasaba commented Nov 25, 2021

Addresses #93770 in which Watcher could potentially create expensive queries to ES.

Summary

  • Size parameter was changed from 10000 to 1000
  • A new server side route that uses createPointInTimeFinder for paging. The client side code only uses the indexPattern names, so we can just return that from the server and avoid sending unnecessary information.

@sabarasaba sabarasaba self-assigned this Nov 25, 2021
@sabarasaba sabarasaba added backport:skip This PR does not require backporting chore Feature:Watcher Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more t// v8.1.0 release_note:skip Skip the PR/issue when compiling release notes labels Nov 29, 2021
@sabarasaba
Copy link
Copy Markdown
Member Author

@elasticmachine merge upstream

@sabarasaba sabarasaba requested a review from alexwizp November 30, 2021 10:00
@sabarasaba sabarasaba marked this pull request as ready for review November 30, 2021 10:00
@sabarasaba sabarasaba requested a review from a team as a code owner November 30, 2021 10:00
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/kibana-stack-management (Team:Stack Management)

@sabarasaba
Copy link
Copy Markdown
Member Author

@elasticmachine merge upstream

Copy link
Copy Markdown
Contributor

@alexwizp alexwizp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM! Thank you

@sebelga sebelga self-requested a review December 2, 2021 09:14
Copy link
Copy Markdown
Contributor

@sebelga sebelga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for fixing this @sabarasaba. Tested locally and works as expected 👍 Left a tiny comment about at type.

@sabarasaba
Copy link
Copy Markdown
Member Author

@elasticmachine merge upstream

@kibana-ci
Copy link
Copy Markdown

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
watcher 272.6KB 272.6KB -68.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @sabarasaba

@sabarasaba sabarasaba added auto-backport Deprecated - use backport:version if exact versions are needed and removed backport:skip This PR does not require backporting labels Dec 3, 2021
@sabarasaba sabarasaba merged commit fd741b4 into elastic:main Dec 3, 2021
@kibanamachine kibanamachine added the backport:skip This PR does not require backporting label Dec 3, 2021
TinLe pushed a commit to TinLe/kibana that referenced this pull request Dec 22, 2021
…to get indexPatterns (elastic#119717)

* Use PointInTimeFinder to paginate through indexPatterns in a more performant way

* commit using @elastic.co

* Start working on tests

* Add tests

* Add missing types

* Fix tests

* Update tests responses

* Remove unnecessary mocks

* Fix type

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@tylersmalley tylersmalley added ci:cloud-deploy Create or update a Cloud deployment and removed ci:deploy-cloud labels Aug 17, 2022
wayneseymour added a commit to wayneseymour/kibana that referenced this pull request Oct 11, 2024
Contributes to: elastic#194817

Why I assigned them:

Assigned advanced_settings due to elastic#175255

Assigned dashboard_controls due to elastic#190797

Assigned dashboard_links due to elastic#174772

Assigned dashboard_panel_options due to elastic#178596

Assigned grok_debugger due to https://github.com/elastic/kibana/blob/main/x-pack/plugins/grokdebugger/kibana.jsonc#L4

Assigned helpers due to elastic#164341 (call site)

Assigned home due to elastic#103192

Assigned index_lifecycle_management due to elastic#116207

Assigned ingest_node_pipelines due to elastic#113783

Assigned kibana_overview due to  https://github.com/elastic/kibana/blob/f00ac7a8a21463e6bb4a2784c3a3884f36c62900/x-pack/plugins/grokdebugger/kibana.jsonc#L4

Assigned management due to elastic#165705

Assigned painless_lab due to https://github.com/elastic/kibana/blob/main/x-pack/plugins/painless_lab/kibana.jsonc#L4

Assigned search_profiler due to elastic#195343

Assigned uptime due to https://github.com/elastic/kibana/blob/main/x-pack/plugins/observability_solution/uptime/kibana.jsonc#L4

Assigned lens due to elastic#175893

Assigned ml_anomaly_detection due to elastic#162126

Assigned canvas due to elastic#164376

Assigned cc replication due to elastic#149069

Assigned enterpise search due to elastic#79359

Assigned graph to due elastic#190797

Assigned license_management due to https://github.com/elastic/kibana/blob/main/x-pack/plugins/license_management/kibana.jsonc#L4

Assigned maps due to elastic#155161

Assigned observability due to https://github.com/elastic/kibana/blob/main/x-pack/plugins/observability_solution/observability/kibana.jsonc#L4

Assigned remote clusters due to elastic#96989

Assigned reporting due to elastic#121435

Assigned rollup_jobs due to https://github.com/elastic/kibana/blob/d57bc9a5d7d64f86b550eff7997605a3090aee9a/x-pack/plugins/rollup/kibana.jsonc#L4

Assigned watcher due to elastic#119717
wayneseymour added a commit that referenced this pull request Oct 22, 2024
## Summary

Assign files within `x-pack/test/accessibility/apps/group[1|2|3]`

### Why I assigned them:

Assigned advanced_settings due to
#175255

Assigned dashboard_controls due to
#190797

Assigned dashboard_links due to
#174772

Assigned dashboard_panel_options due to
#178596

Assigned grok_debugger due to
https://github.com/elastic/kibana/blob/main/x-pack/plugins/grokdebugger/kibana.jsonc#L4

Assigned helpers due to #164341
(call site)

Assigned home due to #103192

Assigned index_lifecycle_management due to
#116207

Assigned ingest_node_pipelines due to
#113783

Assigned kibana_overview due to
https://github.com/elastic/kibana/blob/f00ac7a8a21463e6bb4a2784c3a3884f36c62900/x-pack/plugins/grokdebugger/kibana.jsonc#L4

Assigned management due to #165705

Assigned painless_lab due to
https://github.com/elastic/kibana/blob/main/x-pack/plugins/painless_lab/kibana.jsonc#L4

Assigned search_profiler due to
#195343

Assigned uptime due to
https://github.com/elastic/kibana/blob/main/x-pack/plugins/observability_solution/uptime/kibana.jsonc#L4

Assigned lens due to #175893

Assigned ml_anomaly_detection due to
#162126

Assigned canvas due to #164376

Assigned cc replication due to
#149069

Assigned enterpise search due to
#79359

Assigned graph to due #190797

Assigned license_management due to
https://github.com/elastic/kibana/blob/main/x-pack/plugins/license_management/kibana.jsonc#L4

Assigned maps due to #155161

Assigned observability due to
https://github.com/elastic/kibana/blob/main/x-pack/plugins/observability_solution/observability/kibana.jsonc#L4

Assigned remote clusters due to
#96989

Assigned reporting due to #121435

Assigned rollup_jobs due to
https://github.com/elastic/kibana/blob/d57bc9a5d7d64f86b550eff7997605a3090aee9a/x-pack/plugins/rollup/kibana.jsonc#L4

Assigned watcher due to #119717


Contributes to: #194817

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Rodney Norris <rodney@tattdcodemonkey.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Deprecated - use backport:version if exact versions are needed backport:skip This PR does not require backporting chore ci:cloud-deploy Create or update a Cloud deployment Feature:Watcher release_note:skip Skip the PR/issue when compiling release notes Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more t// v8.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants