Skip to content

Batch ApplyAliasActions cluster state updates (#89924)#90010

Merged
gmarouli merged 16 commits intoelastic:mainfrom
gmarouli:batch-apply-aliases-89924
Dec 30, 2022
Merged

Batch ApplyAliasActions cluster state updates (#89924)#90010
gmarouli merged 16 commits intoelastic:mainfrom
gmarouli:batch-apply-aliases-89924

Conversation

@gmarouli
Copy link
Copy Markdown
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 DO NOT USE. Use ":Distributed/Indices APIs" or ":StorageEngine/Templates" instead. and removed needs:triage Requires assignment of a team area label labels Sep 12, 2022
@elasticsearchmachine elasticsearchmachine added the Team:Data Management (obsolete) DO NOT USE. This team no longer exists. label Sep 12, 2022
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

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

@gmarouli gmarouli added >bug >refactoring and removed Team:Data Management (obsolete) DO NOT USE. This team no longer exists. labels Sep 12, 2022
@elasticsearchmachine elasticsearchmachine added the Team:Data Management (obsolete) DO NOT USE. This team no longer exists. label Sep 12, 2022
@gmarouli
Copy link
Copy Markdown
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
Copy Markdown
Member

@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
Copy Markdown
Contributor Author

@elasticmachine update branch

@gmarouli
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

@elasticmachine update branch

@gmarouli
Copy link
Copy Markdown
Contributor Author

@elasticmachine update branch

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

@elasticmachine update branch

Copy link
Copy Markdown
Member

@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 and others added 2 commits December 30, 2022 13:10
@gmarouli
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member

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 DO NOT USE. Use ":Distributed/Indices APIs" or ":StorageEngine/Templates" instead. >refactoring Team:Data Management (obsolete) DO NOT USE. This team no longer exists. 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