Skip to content

Conversation

@gmarouli
Copy link
Contributor

The MetadataIndexAliasesService was submitting the cluster state update tasks unbatched with priority URGENT. This PR is an attempt to fix this.

Closes: #89924.

@gmarouli gmarouli marked this pull request as ready for review September 12, 2022 15:46
@elasticsearchmachine elasticsearchmachine added the needs:triage Requires assignment of a team area label label Sep 12, 2022
@gmarouli gmarouli added :Data Management/Indices APIs APIs to create and manage indices and templates and removed needs:triage Requires assignment of a team area label labels Sep 12, 2022
@elasticsearchmachine elasticsearchmachine added the Team:Data Management Meta label for data/management team label Sep 12, 2022
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

@gmarouli gmarouli added >bug >refactoring and removed Team:Data Management Meta label for data/management team labels Sep 12, 2022
@elasticsearchmachine elasticsearchmachine added the Team:Data Management Meta label for data/management team label Sep 12, 2022
@gmarouli
Copy link
Contributor Author

@dakrone & @DaveCTurner , I had some time on Friday and I wanted to give this a try to improve my knowledge on different parts of our domain. If you have a moment I would appreciate your input, if you are too busy let me know :).

Copy link
Contributor

@DaveCTurner DaveCTurner left a comment

Choose a reason for hiding this comment

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

Thanks for picking this up @gmarouli; I left a couple of comments.

Also the executor deserves at least a little bit of testing, possibly using something from ClusterStateTaskExecutorUtils.

@gmarouli
Copy link
Contributor Author

@elasticmachine update branch

@gmarouli
Copy link
Contributor Author

@DaveCTurner thank you for the feedback and the tips, I will work on testing the executor too.

@csoulios csoulios added v8.6.0 and removed v8.5.0 labels Sep 21, 2022
@gmarouli
Copy link
Contributor Author

@elasticmachine update branch

@gmarouli
Copy link
Contributor Author

@elasticmachine update branch

@kingherc kingherc added v8.7.0 and removed v8.6.0 labels Nov 16, 2022
@gmarouli
Copy link
Contributor Author

@elasticmachine update branch

Copy link
Contributor

@DaveCTurner DaveCTurner left a comment

Choose a reason for hiding this comment

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

Sorry this dropped off my list @gmarouli. Looks good, I left a few nits and suggestions.

@gmarouli
Copy link
Contributor Author

The test I added wasn't working properly from the beginning. Working on it. An updated version will come soon.

@gmarouli
Copy link
Contributor Author

@DaveCTurner thank you for taking another look, the code improved a lot because of your suggestions. Furthermore, I fixed the test which wasn't doing what I thought was doing and I improved my understanding. I am very grateful. Since this relates to a recent issue we discussed with @original-brownbear , I am adding him in this PR as a reviewer.

Copy link
Contributor

@original-brownbear original-brownbear left a comment

Choose a reason for hiding this comment

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

Looks good, mostly just one suggestion on shortening this a little more and avoiding some duplication.

@original-brownbear
Copy link
Contributor

LGTM, just for posterity.

The latest customer issue that motivated work on this did not only show problems due to not batching these tasks, but also problems from just extremely slowness in the tasks themselves. -> #92609

@DaveCTurner
Copy link
Contributor

I won't get a chance to give this a final look soon so don't wait for me 🙂

@gmarouli gmarouli merged commit e0496fa into elastic:main Dec 30, 2022
@gmarouli gmarouli deleted the batch-apply-aliases-89924 branch August 20, 2024 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>bug :Data Management/Indices APIs APIs to create and manage indices and templates >refactoring Team:Data Management Meta label for data/management team v8.7.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MetadataIndexAliasesService submits unbatched tasks at URGENT priority

7 participants