Adding get migration reindex status#118267
Merged
elasticsearchmachine merged 14 commits intoelastic:mainfrom Dec 10, 2024
Merged
Adding get migration reindex status#118267elasticsearchmachine merged 14 commits intoelastic:mainfrom
elasticsearchmachine merged 14 commits intoelastic:mainfrom
Conversation
Collaborator
|
Hi @masseyke, I've created a changelog YAML for you. |
…eyke/elasticsearch into adding-get-migration-reindex-status
Collaborator
|
Pinging @elastic/es-data-management (Team:Data Management) |
| "indices:admin/cache/clear", | ||
| "indices:admin/data_stream/lazy_rollover", | ||
| "indices:admin/data_stream/reindex", | ||
| "indices:admin/data_stream/reindex_status", |
Contributor
There was a problem hiding this comment.
Should this be indices:admin/migration/reindex_status to match the action name?
More generally, do we want to change the existing related transport actions to migration/...? Though I'm this may not even be possible without a bunch of careful version juggling?
Member
Author
There was a problem hiding this comment.
Yeah good point. I think it's fine to do at this point because (1) the code is inaccessible in serverless and (2) it wasn't in 8.17 so it has not made it into any release yet.
…eyke/elasticsearch into adding-get-migration-reindex-status
…eyke/elasticsearch into adding-get-migration-reindex-status
Collaborator
💚 Backport successful
|
masseyke
added a commit
to masseyke/elasticsearch
that referenced
this pull request
Dec 10, 2024
This adds a new transport action to get the status of a migration reindex (started via the API at elastic#118109), and a new rest action to use it. The rest action accepts the data stream or index name, and returns the status. For example if the reindex task exists for data stream `my-data-stream`: ``` GET /_migration/reindex/my-data-stream/_status?pretty ``` returns ``` { "start_time" : 1733519098570, "complete" : true, "total_indices" : 1, "total_indices_requiring_upgrade" : 0, "successes" : 0, "in_progress" : 0, "pending" : 0, "errors" : [ ] } ``` If a reindex task does not exist: ``` GET _migration/reindex/my-data-stream/_status?pretty ``` Then a 404 is returned: ``` { "error" : { "root_cause" : [ { "type" : "resource_not_found_exception", "reason" : "No migration reindex status found for [my-data-stream]" } ], "type" : "resource_not_found_exception", "reason" : "No migration reindex status found for [my-data-stream]" }, "status" : 404 } ```
elasticsearchmachine
pushed a commit
that referenced
this pull request
Dec 10, 2024
* Adding get migration reindex status (#118267) This adds a new transport action to get the status of a migration reindex (started via the API at #118109), and a new rest action to use it. The rest action accepts the data stream or index name, and returns the status. For example if the reindex task exists for data stream `my-data-stream`: ``` GET /_migration/reindex/my-data-stream/_status?pretty ``` returns ``` { "start_time" : 1733519098570, "complete" : true, "total_indices" : 1, "total_indices_requiring_upgrade" : 0, "successes" : 0, "in_progress" : 0, "pending" : 0, "errors" : [ ] } ``` If a reindex task does not exist: ``` GET _migration/reindex/my-data-stream/_status?pretty ``` Then a 404 is returned: ``` { "error" : { "root_cause" : [ { "type" : "resource_not_found_exception", "reason" : "No migration reindex status found for [my-data-stream]" } ], "type" : "resource_not_found_exception", "reason" : "No migration reindex status found for [my-data-stream]" }, "status" : 404 } ``` * adding migration reindex actions to OperatorPrivilegesIT
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This adds a new transport action to get the status of a migration reindex (started via the API at #118109), and a new rest action to use it. The rest action accepts the data stream or index name, and returns the status. For example if the reindex task exists for data stream
my-data-stream:returns
If a reindex task does not exist:
Then a 404 is returned: