-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Avoid race condition in ILMHistorySotre #53039
Conversation
This change modifies ILMHistoryStore to always apply correct settings and mappings, even if template is deleted and not yet recreated. This ensures that ILM history index is correctly managed by ILM and also fixes flaky history tests that were prone to triggenring this race. This commit also refactors and simplifies ILM history tests. Closes elastic#50353 and elastic#52853
Pinging @elastic/es-core-features (:Core/Features/ILM+SLM) |
@elasticmachine run elasticsearch-ci/bwc |
@elasticmachine update branch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this @probakowski! LGTM
x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/ilm/history/ILMHistoryStore.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change looks good to be overall, but I think these tests will still end up failing due to the race condition between index creation via _bulk requests and manually being checked in the history store.
I think in order to fully fix them we need to add the settings to make the history store as non-async as possible when indexing, so we can prevent the alias/concrete-index issues that were causing failures in the past.
We can definitely merge this (thanks for doing this!), but I think we may still end up with some failures down the road.
Thanks @andreidan and @dakrone, I'll merge it as soon as build passes. |
@elasticmachine run elasticsearch-ci/bwc and run elasticsearch-ci/default-distro |
@elasticmachine update branch |
* Avoid race condition in ILMHistorySotre This change modifies ILMHistoryStore to always apply correct settings and mappings, even if template is deleted and not yet recreated. This ensures that ILM history index is correctly managed by ILM and also fixes flaky history tests that were prone to triggenring this race. This commit also refactors and simplifies ILM history tests. Closes elastic#50353 and elastic#52853 * Review comment Co-authored-by: Elastic Machine <[email protected]>
* Avoid race condition in ILMHistorySotre (#53039) * Avoid race condition in ILMHistorySotre This change modifies ILMHistoryStore to always apply correct settings and mappings, even if template is deleted and not yet recreated. This ensures that ILM history index is correctly managed by ILM and also fixes flaky history tests that were prone to triggenring this race. This commit also refactors and simplifies ILM history tests. Closes #50353 and #52853 * Review comment Co-authored-by: Elastic Machine <[email protected]> * fixed tests * backport #53306 Co-authored-by: Elastic Machine <[email protected]>
This change modifies ILMHistoryStore to always apply correct settings and mappings,
even if template is deleted and not yet recreated. This ensures that ILM history index
is correctly managed by ILM and also fixes flaky history tests that were prone to
triggering this race.
This commit also refactors and simplifies ILM history tests.
Closes #50353 and #52853