-
Notifications
You must be signed in to change notification settings - Fork 25.6k
ILM: searchable snapshot executes before migrate in cold/frozen #68861
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
Changes from 2 commits
af86b10
07c36ea
7c3ffd2
420a2ce
9947ad4
51ba7c7
89a4724
5300b2f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -47,8 +47,8 @@ public class TimeseriesLifecycleType implements LifecycleType { | |
| static final List<String> ORDERED_VALID_WARM_ACTIONS = Arrays.asList(SetPriorityAction.NAME, UnfollowAction.NAME, ReadOnlyAction.NAME, | ||
| AllocateAction.NAME, MigrateAction.NAME, ShrinkAction.NAME, ForceMergeAction.NAME); | ||
| static final List<String> ORDERED_VALID_COLD_ACTIONS; | ||
| static final List<String> ORDERED_VALID_FROZEN_ACTIONS = Arrays.asList(SetPriorityAction.NAME, UnfollowAction.NAME, ReadOnlyAction.NAME, | ||
| AllocateAction.NAME, MigrateAction.NAME, FreezeAction.NAME, SearchableSnapshotAction.NAME); | ||
| static final List<String> ORDERED_VALID_FROZEN_ACTIONS = Arrays.asList(SetPriorityAction.NAME, UnfollowAction.NAME, | ||
| ReadOnlyAction.NAME, SearchableSnapshotAction.NAME, AllocateAction.NAME, MigrateAction.NAME, FreezeAction.NAME); | ||
| static final List<String> ORDERED_VALID_DELETE_ACTIONS = Arrays.asList(WaitForSnapshotAction.NAME, DeleteAction.NAME); | ||
| static final Set<String> VALID_HOT_ACTIONS; | ||
| static final Set<String> VALID_WARM_ACTIONS = Sets.newHashSet(ORDERED_VALID_WARM_ACTIONS); | ||
|
|
@@ -67,13 +67,13 @@ public class TimeseriesLifecycleType implements LifecycleType { | |
| if (RollupV2.isEnabled()) { | ||
| ORDERED_VALID_HOT_ACTIONS = Arrays.asList(SetPriorityAction.NAME, UnfollowAction.NAME, RolloverAction.NAME, | ||
| ReadOnlyAction.NAME, RollupILMAction.NAME, ShrinkAction.NAME, ForceMergeAction.NAME, SearchableSnapshotAction.NAME); | ||
| ORDERED_VALID_COLD_ACTIONS = Arrays.asList(SetPriorityAction.NAME, UnfollowAction.NAME, AllocateAction.NAME, | ||
| MigrateAction.NAME, FreezeAction.NAME, RollupILMAction.NAME, SearchableSnapshotAction.NAME); | ||
| ORDERED_VALID_COLD_ACTIONS = Arrays.asList(SetPriorityAction.NAME, UnfollowAction.NAME, SearchableSnapshotAction.NAME, | ||
| AllocateAction.NAME, MigrateAction.NAME, FreezeAction.NAME, RollupILMAction.NAME); | ||
| } else { | ||
| ORDERED_VALID_HOT_ACTIONS = Arrays.asList(SetPriorityAction.NAME, UnfollowAction.NAME, RolloverAction.NAME, | ||
| ReadOnlyAction.NAME, ShrinkAction.NAME, ForceMergeAction.NAME, SearchableSnapshotAction.NAME); | ||
| ORDERED_VALID_COLD_ACTIONS = Arrays.asList(SetPriorityAction.NAME, UnfollowAction.NAME, AllocateAction.NAME, | ||
| MigrateAction.NAME, FreezeAction.NAME, SearchableSnapshotAction.NAME); | ||
| ORDERED_VALID_COLD_ACTIONS = Arrays.asList(SetPriorityAction.NAME, UnfollowAction.NAME, SearchableSnapshotAction.NAME, | ||
| AllocateAction.NAME, MigrateAction.NAME, FreezeAction.NAME); | ||
| } | ||
| VALID_HOT_ACTIONS = Sets.newHashSet(ORDERED_VALID_HOT_ACTIONS); | ||
| VALID_COLD_ACTIONS = Sets.newHashSet(ORDERED_VALID_COLD_ACTIONS); | ||
|
|
@@ -133,6 +133,11 @@ static boolean shouldInjectMigrateStepForPhase(Phase phase) { | |
| } | ||
| } | ||
|
|
||
| if (phase.getActions().get(SearchableSnapshotAction.NAME) != null) { | ||
| // the `searchable_snapshot` action defines migration rules itself, so no need to inject a migrate action | ||
| return false; | ||
| } | ||
|
||
|
|
||
| MigrateAction migrateAction = (MigrateAction) phase.getActions().get(MigrateAction.NAME); | ||
| // if the user configured the {@link MigrateAction} already we won't automatically configure it | ||
| return migrateAction == null; | ||
|
|
||
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.
Can you add some
debuglogging about how we're skipping the migration because of XYZ for this? I think it'd be helpful if someone is trying to diagnose why migrate behaves the way it does.