Skip to content

Add Downsample Action to unfollow injection logic #128788

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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/changelog/128788.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pr: 105773
summary: Inject an unfollow action before executing a downsample action in ILM
area: ILM+SLM
type: bug
issues:
- 105773
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ public List<Phase> getOrderedPhases(Map<String, Phase> phases) {
if (actions.containsKey(UnfollowAction.NAME) == false
&& (actions.containsKey(RolloverAction.NAME)
|| actions.containsKey(ShrinkAction.NAME)
|| actions.containsKey(SearchableSnapshotAction.NAME))) {
|| actions.containsKey(SearchableSnapshotAction.NAME)
|| actions.containsKey(DownsampleAction.NAME))) {
Map<String, LifecycleAction> actionMap = new HashMap<>(phase.getActions());
actionMap.put(UnfollowAction.NAME, UnfollowAction.INSTANCE);
phase = new Phase(phase.getName(), phase.getMinimumAge(), actionMap);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,9 @@ public void testUnfollowInjections() {
assertTrue(isUnfollowInjected("cold", SearchableSnapshotAction.NAME));
assertTrue(isUnfollowInjected("frozen", SearchableSnapshotAction.NAME));

assertTrue(isUnfollowInjected("warm", DownsampleAction.NAME));
assertTrue(isUnfollowInjected("cold", DownsampleAction.NAME));

assertFalse(isUnfollowInjected("hot", SetPriorityAction.NAME));
assertFalse(isUnfollowInjected("warm", SetPriorityAction.NAME));
assertFalse(isUnfollowInjected("warm", AllocateAction.NAME));
Expand Down
Loading