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

Restrict ILM frozen phase to searchable snapshot actions only #70158

Merged
merged 3 commits into from
Mar 9, 2021

Conversation

dakrone
Copy link
Member

@dakrone dakrone commented Mar 9, 2021

This commit changes the frozen phase within ILM in the following ways:

  • The searchable_snapshot action now no longer takes a storage parameter. The storage type is
    determined by the phase within which it is invoked (shared cache for frozen and full copy for
    everything else).
  • The frozen phase in ILM now no longer allows any actions other than searchable_snapshot
  • If a frozen phase is provided, it must include a searchable_snapshot action.

These changes may seem breaking, but since they are intended to go back to 7.12 which has not been
released yet, they are not truly breaking changes.

This commit changes the frozen phase within ILM in the following ways:

- The `searchable_snapshot` action now no longer takes a `storage` parameter. The storage type is
determined by the phase within which it is invoked (shared cache for frozen and full copy for
everything else).
- The frozen phase in ILM now no longer allows *any* actions other than `searchable_snapshot`
- If a frozen phase is provided, it *must* include a `searchable_snapshot` action.

These changes may seem breaking, but since they are intended to go back to 7.12 which has not been
released yet, they are not truly breaking changes.
@elasticmachine elasticmachine added the Team:Data Management Meta label for data/management team label Mar 9, 2021
@elasticmachine
Copy link
Collaborator

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

Comment on lines +192 to +193
boolean bwc_tests_enabled = false
String bwc_tests_disabled_issue = "https://github.com/elastic/elasticsearch/pull/70158" /* place a PR link here when committing bwc changes */
Copy link
Member Author

@dakrone dakrone Mar 9, 2021

Choose a reason for hiding this comment

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

This is required because I am removing the serialization for 7.12 in a weird way (we don't usually remove things like this), once this has been backported all the way back to 7.12 I will re-enable BWC

@dakrone dakrone requested a review from andreidan March 9, 2021 15:49
Copy link
Contributor

@andreidan andreidan 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 implementing this Lee

@@ -189,6 +192,17 @@ public static LifecyclePolicy randomTimeseriesLifecyclePolicy(@Nullable String l
}
phases.put(phase, new Phase(phase, after, actions));
}
// Add a frozen phase if neither the hot nor cold phase contains a searchable snapshot action
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the connection between the hot/cold actions and the frozen phase? We're still able to have searchable_snapshot actions in all phases as far as I understand

Copy link
Member Author

Choose a reason for hiding this comment

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

It's mostly because we'd have to use a consistent repository name (or else validation would fail), we have enough validation that this gets more and more complex, and this doesn't have to generate all possible valid lifecycles, just a random one.

@@ -413,6 +411,22 @@ public static String validateMonotonicallyIncreasingPhaseTimings(Collection<Phas
return Strings.collectionToCommaDelimitedString(errors);
}

/**
* Require that all "frozen" phases configured in a policy have a searchable snapshot action.
Copy link
Contributor

Choose a reason for hiding this comment

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

uber nit :) but this implies the possible presence of multiple frozen phases in one policy and it might be confusing

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point, I changed this to not imply that.

@dakrone dakrone merged commit 67f13bb into elastic:master Mar 9, 2021
@dakrone dakrone deleted the ilm-frozen-strictness branch March 9, 2021 18:24
dakrone added a commit to dakrone/elasticsearch that referenced this pull request Mar 9, 2021
…c#70158)

This commit changes the frozen phase within ILM in the following ways:

- The `searchable_snapshot` action now no longer takes a `storage` parameter. The storage type is
determined by the phase within which it is invoked (shared cache for frozen and full copy for
everything else).
- The frozen phase in ILM now no longer allows *any* actions other than `searchable_snapshot`
- If a frozen phase is provided, it *must* include a `searchable_snapshot` action.

These changes may seem breaking, but since they are intended to go back to 7.12 which has not been
released yet, they are not truly breaking changes.
dakrone added a commit to dakrone/elasticsearch that referenced this pull request Mar 9, 2021
…c#70158)

This commit changes the frozen phase within ILM in the following ways:

- The `searchable_snapshot` action now no longer takes a `storage` parameter. The storage type is
determined by the phase within which it is invoked (shared cache for frozen and full copy for
everything else).
- The frozen phase in ILM now no longer allows *any* actions other than `searchable_snapshot`
- If a frozen phase is provided, it *must* include a `searchable_snapshot` action.

These changes may seem breaking, but since they are intended to go back to 7.12 which has not been
released yet, they are not truly breaking changes.
dakrone added a commit to dakrone/elasticsearch that referenced this pull request Mar 9, 2021
With elastic#70158 (master), elastic#70170 (7.x), and elastic#70171 (7.12) merged, we can now re-enable backwards
compatibilty tests on master and 7.x.
dakrone added a commit to dakrone/elasticsearch that referenced this pull request Mar 9, 2021
The action was recently removed from the list of acceptable actions (elastic#70158), the test shouldn't use
it any more.
dakrone added a commit that referenced this pull request Mar 9, 2021
The action was recently removed from the list of acceptable actions (#70158), the test shouldn't use
it any more.
dakrone added a commit to dakrone/elasticsearch that referenced this pull request Mar 9, 2021
The action was recently removed from the list of acceptable actions (elastic#70158), the test shouldn't use
it any more.
dakrone added a commit that referenced this pull request Mar 9, 2021
The action was recently removed from the list of acceptable actions (#70158), the test shouldn't use
it any more.
dakrone added a commit that referenced this pull request Mar 9, 2021
…70158) (#70171)

* Restrict ILM frozen phase to searchable snapshot actions only (#70158)

This commit changes the frozen phase within ILM in the following ways:

- The `searchable_snapshot` action now no longer takes a `storage` parameter. The storage type is
determined by the phase within which it is invoked (shared cache for frozen and full copy for
everything else).
- The frozen phase in ILM now no longer allows *any* actions other than `searchable_snapshot`
- If a frozen phase is provided, it *must* include a `searchable_snapshot` action.

These changes may seem breaking, but since they are intended to go back to 7.12 which has not been
released yet, they are not truly breaking changes.

* Fix compilation
dakrone added a commit that referenced this pull request Mar 9, 2021
…70158) (#70170)

Backports the following commits to 7.x:

    Restrict ILM frozen phase to searchable snapshot actions only (#70158)
    Remove "frozen" from read only tests (#70173)
dakrone added a commit that referenced this pull request Mar 9, 2021
With #70158 (master), #70170 (7.x), and #70171 (7.12) merged, we can now re-enable backwards
compatibilty tests on master and 7.x.
dakrone added a commit to dakrone/elasticsearch that referenced this pull request Mar 9, 2021
…ic#70179)

With elastic#70158 (master), elastic#70170 (7.x), and elastic#70171 (7.12) merged, we can now re-enable backwards
compatibilty tests on master and 7.x.
dakrone added a commit that referenced this pull request Mar 10, 2021
…70179) (#70188)

With #70158 (master), #70170 (7.x), and #70171 (7.12) merged, we can now re-enable backwards
compatibilty tests on master and 7.x.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker :Data Management/ILM+SLM Index and Snapshot lifecycle management Team:Data Management Meta label for data/management team v7.12.0 v7.13.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants