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

Use all profiling events on startup #92087

Merged

Conversation

danielmitterdorfer
Copy link
Member

With this commit we use profiling-events-all to query profiling events
if the appropriate index for a sample count is not present yet. This can
happen on cluster startup when only a few events have been accumulated
because additional indices are only created when there are enough
events. This aligns behavior of the Elasticsearch plugin with the Kibana
plugin.

We also refactor the profiling-related test cases so we can simulate situations
after cluster startup when not all profiling-related indices have been created.
As testing also cancellation would require additional complexity and
decreases test maintainability (need to adjust slack based on the scenario
which is a very low-level change), we also separate tests for the regular case
and cancellation.

Relates #91640

With this commit we use `profiling-events-all` to query profiling events
if the appropriate index for a sample count is not present yet. This can
happen on cluster startup when only a few events have been accumulated
because additional indices are only created when there are enough
events. This aligns behavior of the Elasticsearch plugin with the Kibana
plugin.

Relates elastic#91640
With this commit we refactor the profiling-related test cases so we can
simulate situations after cluster startup when not all profiling-related
indices have been created. As testing also cancellation would require
additional complexity and decreases test maintainability (need to adjust
`slack` based on the scenario which is a very low-level change), we also
separate tests for the regular case and cancellation.
@danielmitterdorfer danielmitterdorfer added >bug :Search/Search Search-related issues that do not fall into other categories v8.7.0 labels Dec 5, 2022
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-search (Team:Search)

@elasticsearchmachine elasticsearchmachine added the Team:Search Meta label for search team label Dec 5, 2022
@elasticsearchmachine
Copy link
Collaborator

Hi @danielmitterdorfer, I've created a changelog YAML for you.

@danielmitterdorfer
Copy link
Member Author

Note to reviewers: I've split the PR into two commits:

  • The key change is contained in 2413d78.
  • 67dda03 contains a test case refactoring. The main change there is that we randomize whether all profiling-related event indices or only profiling-events-all is created.

@danielmitterdorfer
Copy link
Member Author

Thanks for the review! :)

@danielmitterdorfer danielmitterdorfer merged commit 3c3b3a7 into elastic:main Dec 6, 2022
@danielmitterdorfer danielmitterdorfer deleted the all-idx-fallback branch December 6, 2022 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Search/Search Search-related issues that do not fall into other categories Team:Search Meta label for search team v8.7.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants