-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Copy all execution state in CopyExecutionStateStep #73792
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
Merged
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
This changes the `CopyExecutionStateStep` to copy all of the existing state from the original to the new index after a shrink or searchable snapshot ILM action. It also has two other changes First, it fixes issues in `LifecycleExecutionState.equals` and `hashCode` where parts were missing, and modifies the tests better so they would catch these issues better. Second, it moves the lifecycle policy validation out of the constructor to a new method. This is required because `PolicyStepsRegistry` constructs a new `LifecyclePolicy` out of the cached phase JSON combined with the policy from the cluster state. In the event that the cached JSON contains an action that prevents subsequent actions from being defined, we need to leniently allow this behavior, because those steps will be ignored (see elastic#64883 for this original implementation). The policy is still validated when loaded elsewhere however. Resolves elastic#73791
Collaborator
|
Pinging @elastic/es-core-features (Team:Core/Features) |
Member
Author
|
@elasticmachine update branch |
Member
Author
|
@elasticmachine run elasticsearch-ci/part-2 |
andreidan
approved these changes
Jun 7, 2021
Contributor
andreidan
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, thanks for fixing this Lee
dakrone
added a commit
to dakrone/elasticsearch
that referenced
this pull request
Jun 7, 2021
This changes the CopyExecutionStateStep to copy all of the existing state from the original to the new index after a shrink or searchable snapshot ILM action. It also has two other changes First, it fixes issues in LifecycleExecutionState.equals and hashCode where parts were missing, and modifies the tests better so they would catch these issues better. Second, it moves the lifecycle policy validation out of the constructor to a new method. This is required because PolicyStepsRegistry constructs a new LifecyclePolicy out of the cached phase JSON combined with the policy from the cluster state. In the event that the cached JSON contains an action that prevents subsequent actions from being defined, we need to leniently allow this behavior, because those steps will be ignored (see elastic#64883 for this original implementation). The policy is still validated when loaded elsewhere however. Resolves elastic#73791 # Conflicts: # x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/ilm/actions/SearchableSnapshotActionIT.java
dakrone
added a commit
to dakrone/elasticsearch
that referenced
this pull request
Jun 7, 2021
This changes the CopyExecutionStateStep to copy all of the existing state from the original to the new index after a shrink or searchable snapshot ILM action. It also has two other changes First, it fixes issues in LifecycleExecutionState.equals and hashCode where parts were missing, and modifies the tests better so they would catch these issues better. Second, it moves the lifecycle policy validation out of the constructor to a new method. This is required because PolicyStepsRegistry constructs a new LifecyclePolicy out of the cached phase JSON combined with the policy from the cluster state. In the event that the cached JSON contains an action that prevents subsequent actions from being defined, we need to leniently allow this behavior, because those steps will be ignored (see elastic#64883 for this original implementation). The policy is still validated when loaded elsewhere however. Resolves elastic#73791 # Conflicts: # x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ilm/LifecyclePolicy.java # x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/ilm/actions/SearchableSnapshotActionIT.java
dakrone
added a commit
that referenced
this pull request
Jun 7, 2021
…73849) This changes the CopyExecutionStateStep to copy all of the existing state from the original to the new index after a shrink or searchable snapshot ILM action. It also has two other changes First, it fixes issues in LifecycleExecutionState.equals and hashCode where parts were missing, and modifies the tests better so they would catch these issues better. Second, it moves the lifecycle policy validation out of the constructor to a new method. This is required because PolicyStepsRegistry constructs a new LifecyclePolicy out of the cached phase JSON combined with the policy from the cluster state. In the event that the cached JSON contains an action that prevents subsequent actions from being defined, we need to leniently allow this behavior, because those steps will be ignored (see #64883 for this original implementation). The policy is still validated when loaded elsewhere however. Resolves #73791 # Conflicts: # x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ilm/LifecyclePolicy.java # x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/ilm/actions/SearchableSnapshotActionIT.java
dakrone
added a commit
that referenced
this pull request
Jun 7, 2021
…3848) 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
>bug
:Data Management/ILM+SLM
Index and Snapshot lifecycle management
Team:Data Management
Meta label for data/management team
v7.13.2
v7.14.0
v8.0.0-alpha1
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 changes the
CopyExecutionStateStepto copy all of the existing state from the original to thenew index after a shrink or searchable snapshot ILM action.
It also has two other changes
First, it fixes issues in
LifecycleExecutionState.equalsandhashCodewhere parts were missing,and modifies the tests better so they would catch these issues better.
Second, it moves the lifecycle policy validation out of the constructor to a new method. This is
required because
PolicyStepsRegistryconstructs a newLifecyclePolicyout of the cached phaseJSON combined with the policy from the cluster state. In the event that the cached JSON contains an
action that prevents subsequent actions from being defined, we need to leniently allow this
behavior, because those steps will be ignored (see #64883 for this original implementation). The
policy is still validated when loaded elsewhere however.
Resolves #73791