Skip to content
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

ILM: Allow searchable_snapshot to follow searchable_snapshot #68864

Merged

Conversation

andreidan
Copy link
Contributor

We added this validation for the hot phase as that was the only place a
searchable_snapshot action could precede another searchable_snapshot action.
This is not the case anymore and we now support multiple actions in the
same policy.

This changes the validation to allow the searchable_snapshot in the hot
phase
to be followed by other searchable_snapshot actions.

We added this validation for the hot phase as that was the only place a
searchable_snapshot action could precede another `searchable_snapshot` action.
This is not the case anymore and we now support multiple actions in the
same policy.

This changes the validation to allow the `searchable_snapshot` *in the hot
phase* to be followed by other `searchable_snapshot` actions.
@andreidan andreidan added :Data Management/ILM+SLM Index and Snapshot lifecycle management v8.0.0 v7.12.0 labels Feb 10, 2021
@elasticmachine elasticmachine added the Team:Data Management Meta label for data/management team label Feb 10, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-features (Team:Core/Features)

singletonMap(SearchableSnapshotAction.NAME, new SearchableSnapshotAction(snapshotRepo, randomBoolean(),
MountSearchableSnapshotRequest.Storage.SHARED_CACHE))),
createPolicy(client(), policy,
new Phase("hot", TimeValue.ZERO,
Copy link
Contributor Author

@andreidan andreidan Feb 10, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Piggybacked the hot -> frozen searchable_snapshot actions scenario on this test (as it wasn't tested anywhere)

@andreidan
Copy link
Contributor Author

@elasticmachine update branch

@andreidan andreidan removed the request for review from dakrone February 10, 2021 19:48
@andreidan andreidan added the WIP label Feb 10, 2021
@andreidan
Copy link
Contributor Author

This is still a WIP. The validation currently looks at the hot phase specifically and I think it should be more general.

dakrone
dakrone previously approved these changes Feb 10, 2021
Copy link
Member

@dakrone dakrone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dakrone dakrone dismissed their stale review February 10, 2021 20:08

I'll wait until this isn't a WIP before approving :)

This expands the validation to include the cases where the frozen action
defines illegal actions after a searchable_snapshot defined in the cold
phase.
@andreidan andreidan removed the WIP label Feb 11, 2021
@andreidan
Copy link
Contributor Author

@elasticmachine update branch

Copy link
Member

@dakrone dakrone left a 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

@andreidan
Copy link
Contributor Author

@elasticmachine run elasticsearch-ci/2

@andreidan andreidan merged commit c10ba9e into elastic:master Feb 15, 2021
andreidan added a commit to andreidan/elasticsearch that referenced this pull request Feb 15, 2021
…stic#68864)

We added this validation for the hot phase as that was the only place a
searchable_snapshot action could precede another `searchable_snapshot` action.
This is not the case anymore and we now support multiple actions in the
same policy.

This expands the validation to include the cases where the frozen action
defines illegal actions after a searchable_snapshot defined in the cold
phase.

(cherry picked from commit c10ba9e)
Signed-off-by: Andrei Dan <andrei.dan@elastic.co>

# Conflicts:
#	x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ilm/TimeseriesLifecycleTypeTests.java
andreidan added a commit that referenced this pull request Feb 15, 2021
#68864) (#68972)

We added this validation for the hot phase as that was the only place a
searchable_snapshot action could precede another `searchable_snapshot` action.
This is not the case anymore and we now support multiple actions in the
same policy.

This expands the validation to include the cases where the frozen action
defines illegal actions after a searchable_snapshot defined in the cold
phase.

(cherry picked from commit c10ba9e)
Signed-off-by: Andrei Dan <andrei.dan@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Data Management/ILM+SLM Index and Snapshot lifecycle management Team:Data Management Meta label for data/management team v7.12.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants