-
Notifications
You must be signed in to change notification settings - Fork 25.7k
Add lifecycle setting to destination index after adding to data stream #123071
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
Add lifecycle setting to destination index after adding to data stream #123071
Conversation
|
Pinging @elastic/es-data-management (Team:Data Management) |
.../main/java/org/elasticsearch/xpack/migrate/task/ReindexDataStreamPersistentTaskExecutor.java
Show resolved
Hide resolved
.../main/java/org/elasticsearch/xpack/migrate/action/ReindexDataStreamIndexTransportAction.java
Show resolved
Hide resolved
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.
Other than my comment about adding a couple of comments (we won't remember this at all a year from now), LGTM.
lukewhiting
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 👍🏻
💔 Backport failed
You can use sqren/backport to manually backport by running |
elastic#123071) When reindexing a data stream, remove the lifecycle name setting when creating the destination index, so that ILM does not process it. Add the setting back after adding the destination index to the data stream, at which point ILM can safely process it.
elastic#123071) When reindexing a data stream, remove the lifecycle name setting when creating the destination index, so that ILM does not process it. Add the setting back after adding the destination index to the data stream, at which point ILM can safely process it. (cherry picked from commit f044d97) # Conflicts: # x-pack/plugin/migrate/src/internalClusterTest/java/org/elasticsearch/xpack/migrate/action/ReindexDatastreamIndexTransportActionIT.java
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
elastic#123071) When reindexing a data stream, remove the lifecycle name setting when creating the destination index, so that ILM does not process it. Add the setting back after adding the destination index to the data stream, at which point ILM can safely process it. (cherry picked from commit f044d97) # Conflicts: # x-pack/plugin/migrate/src/internalClusterTest/java/org/elasticsearch/xpack/migrate/action/ReindexDatastreamIndexTransportActionIT.java
#123071) (#123159) When reindexing a data stream, remove the lifecycle name setting when creating the destination index, so that ILM does not process it. Add the setting back after adding the destination index to the data stream, at which point ILM can safely process it. (cherry picked from commit f044d97) # Conflicts: # x-pack/plugin/migrate/src/internalClusterTest/java/org/elasticsearch/xpack/migrate/action/ReindexDatastreamIndexTransportActionIT.java
#123071) (#123158) When reindexing a data stream, remove the lifecycle name setting when creating the destination index, so that ILM does not process it. Add the setting back after adding the destination index to the data stream, at which point ILM can safely process it. (cherry picked from commit f044d97) # Conflicts: # x-pack/plugin/migrate/src/internalClusterTest/java/org/elasticsearch/xpack/migrate/action/ReindexDatastreamIndexTransportActionIT.java
… stream (#123071) (#123151) * Add lifecycle setting to destination index after adding to data stream (#123071) When reindexing a data stream, remove the lifecycle name setting when creating the destination index, so that ILM does not process it. Add the setting back after adding the destination index to the data stream, at which point ILM can safely process it. * [CI] Auto commit changes from spotless * timeout now in request in 9.0 * another silly compilation error * [CI] Auto commit changes from spotless --------- Co-authored-by: elasticsearchmachine <[email protected]>
When a lifecycle name is added to an index, ILM will immediately attempt to process it. When reindexing indices, if the destination index has a lifecycle name before it added to the data stream, this will cause ILM to fail. We should filter out the lifecycle name from the setting copied from the source index to the destination index, and only add it back to the destination index after it has been added to the data stream.