-
Notifications
You must be signed in to change notification settings - Fork 25.4k
Retry on ClusterBlockException on transform destination index #118194
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
Merged
dan-rubinstein
merged 9 commits into
elastic:main
from
dan-rubinstein:handle-transform-reindex-failures
Dec 12, 2024
Merged
Retry on ClusterBlockException on transform destination index #118194
dan-rubinstein
merged 9 commits into
elastic:main
from
dan-rubinstein:handle-transform-reindex-failures
Dec 12, 2024
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hi @dan-rubinstein, I've created a changelog YAML for you. |
Pinging @elastic/ml-core (Team:ML) |
jonathan-buttner
approved these changes
Dec 10, 2024
...src/test/java/org/elasticsearch/xpack/transform/transforms/TransformFailureHandlerTests.java
Outdated
Show resolved
Hide resolved
...src/test/java/org/elasticsearch/xpack/transform/transforms/TransformFailureHandlerTests.java
Outdated
Show resolved
Hide resolved
jonathan-buttner
approved these changes
Dec 10, 2024
@elasticmachine merge upstream |
jonathan-buttner
approved these changes
Dec 11, 2024
...form/src/main/java/org/elasticsearch/xpack/transform/transforms/TransformFailureHandler.java
Outdated
Show resolved
Hide resolved
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
dan-rubinstein
added a commit
to dan-rubinstein/elasticsearch
that referenced
this pull request
Dec 12, 2024
…c#118194) * Retry on ClusterBlockException on transform destination index * Update docs/changelog/118194.yaml * Cleaning up tests * Fixing tests --------- Co-authored-by: Elastic Machine <[email protected]>
elasticsearchmachine
pushed a commit
that referenced
this pull request
Dec 12, 2024
… (#118581) * Retry on ClusterBlockException on transform destination index * Update docs/changelog/118194.yaml * Cleaning up tests * Fixing tests --------- Co-authored-by: Elastic Machine <[email protected]>
maxhniebergall
pushed a commit
to maxhniebergall/elasticsearch
that referenced
this pull request
Dec 16, 2024
…c#118194) (elastic#118581) * Retry on ClusterBlockException on transform destination index * Update docs/changelog/118194.yaml * Cleaning up tests * Fixing tests --------- Co-authored-by: Elastic Machine <[email protected]>
maxhniebergall
pushed a commit
to maxhniebergall/elasticsearch
that referenced
this pull request
Dec 16, 2024
…c#118194) (elastic#118581) * Retry on ClusterBlockException on transform destination index * Update docs/changelog/118194.yaml * Cleaning up tests * Fixing tests --------- Co-authored-by: Elastic Machine <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
auto-backport
Automatically create backport pull requests when merged
>enhancement
:ml
Machine learning
Team:ML
Meta label for the ML team
v8.18.0
v9.0.0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue - https://github.com/elastic/ml-team/issues/1417
Description
As part of the upgrade process from 8.x -> 9.x users will have to re-index their indices. The recommended route is using the kibana upgrade assistant to do this which will add an index block to the original index before re-indexing and will remove the block after re-indexing. Currently, the upgrade assistant does not stop transforms before re-indexing or start them after re-indexing. As such, if a user begins the re-index process, all transforms with destination indices that are being re-indexed will fail due to the write block. This change adds a retry mechanism that continuously retries until the write-block is removed at which point the transform will succeed. The retry count does not increase.
Both write and read-only blocks will work with this change as they both throw the same ClusterBlockException. The kibana upgrade assistant likely uses read-only blocks but since write-blocks would raise the same problem for transforms, it makes sense to treat the scenario the same way.
This change also adds more rigorous testing to the overall transform failure handler as some of the failure cases were missing from testing.
Note: This logic occurs at the end of the transform process when we attempt to write to the destination index. As a follow-up improvement, we will be adding this check to the start of the transform process to avoid doing unnecessary reads from the source index as well.
Note: As another follow-up improvement, we would like to modify the transform health check process to catch this case and flag the transform's health as yellow instead of green which it currently does with the retries.
Test