-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Allow data stream reindex tasks to be re-run after completion #122510
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
Allow data stream reindex tasks to be re-run after completion #122510
Conversation
976e6d5 to
77b4b93
Compare
77b4b93 to
7c1b83b
Compare
|
Pinging @elastic/es-data-management (Team:Data Management) |
parkertimmins
left a comment
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.
Looks correct to me. But Keith knows this code better, so let's wait to merge until he has taken a look.
|
Looks good to me, but can you add a note about it at https://github.com/elastic/elasticsearch/blob/main/docs/reference/migration/apis/data-stream-reindex.asciidoc?plain=1#L25? |
Ignoring this so it can be picked up in backport. Will open the relevant docs repo issue once this is merged. |
|
Warning It looks like this PR modifies one or more |
Co-authored-by: Keith Massey <[email protected]>
|
Warning It looks like this PR modifies one or more |
|
Warning It looks like this PR modifies one or more |
masseyke
left a comment
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.
LGTM
…c#122510) * Allow data stream reindex tasks to be re-run after completion * Docs update * Update docs/reference/migration/apis/data-stream-reindex.asciidoc Co-authored-by: Keith Massey <[email protected]> --------- Co-authored-by: Keith Massey <[email protected]>
…c#122510) * Allow data stream reindex tasks to be re-run after completion * Docs update * Update docs/reference/migration/apis/data-stream-reindex.asciidoc Co-authored-by: Keith Massey <[email protected]> --------- Co-authored-by: Keith Massey <[email protected]>
… (#123035) * Allow data stream reindex tasks to be re-run after completion * Docs update * Update docs/reference/migration/apis/data-stream-reindex.asciidoc --------- Co-authored-by: Keith Massey <[email protected]>
… (#123037) * Allow data stream reindex tasks to be re-run after completion * Docs update * Update docs/reference/migration/apis/data-stream-reindex.asciidoc --------- Co-authored-by: Keith Massey <[email protected]>
… (#123036) * Allow data stream reindex tasks to be re-run after completion * Docs update * Update docs/reference/migration/apis/data-stream-reindex.asciidoc --------- Co-authored-by: Keith Massey <[email protected]>
This PR modified the Reindex Datastreams endpoint to allow it to correctly handle restarting a reindex job in the 24 hours after it completes.
Currently, because we cache the job for 24 hours after completion, you can't start a new reindex for the same datastream as it will throw an exception due to the duplicated persistent task ID.
The PR updates that behaviour so that the endpoint now checks for an existing task for that datastream, if it finds one, it check the status. If still running, fail as before but if complete then remove that task from the cache and start a new task.