Skip to content

Commit a0ec343

Browse files
committed
Remove data_frozen node role (tier) and frozen ILM phase (elastic#62403)
With the differentiation between searchable snapshots on the cold phase and searchable snapshots on the frozen phase not implemented, there is no need to have a separate phase/tier for now. This commit removes the frozen phase and tier, which can be added back at a later time. (this tier was never in a released version, so this is not a breaking change) Relates to elastic#60983 Relates to elastic#60994 Relates to elastic#60848
1 parent 61ea9af commit a0ec343

File tree

14 files changed

+45
-210
lines changed

14 files changed

+45
-210
lines changed

docs/reference/ilm/actions/ilm-allocate.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
[[ilm-allocate]]
33
=== Allocate
44

5-
Phases allowed: warm, cold, frozen.
5+
Phases allowed: warm, cold.
66

77
Updates the index settings to change which nodes are allowed to host the index shards
88
and change the number of replicas.

docs/reference/ilm/actions/ilm-freeze.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
[[ilm-freeze]]
33
=== Freeze
44

5-
Phases allowed: cold, frozen.
5+
Phases allowed: cold.
66

77
<<frozen-indices, Freezes>> an index to minimize its memory footprint.
88

docs/reference/ilm/actions/ilm-searchable-snapshot.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
[[ilm-searchable-snapshot]]
33
=== Searchable snapshot
44

5-
Phases allowed: cold, frozen.
5+
Phases allowed: cold.
66

77
Takes a snapshot of the managed index in the configured repository
88
and mounts it as a searchable snapshot.

docs/reference/ilm/actions/ilm-set-priority.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
[[ilm-set-priority]]
33
=== Set priority
44

5-
Phases allowed: hot, warm, cold, frozen.
5+
Phases allowed: hot, warm, cold.
66

77
Sets the <<recovery-prioritization, priority>> of the index as
88
soon as the policy enters the hot, warm, or cold phase.

docs/reference/ilm/actions/ilm-unfollow.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
[[ilm-unfollow]]
33
=== Unfollow
44

5-
Phases allowed: hot, warm, cold, frozen.
5+
Phases allowed: hot, warm, cold.
66

77
Converts a {ref}/ccr-apis.html[{ccr-init}] follower index into a regular index.
88
This enables the shrink, rollover, and searchable snapshot actions

docs/reference/ilm/ilm-index-lifecycle.asciidoc

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,13 @@
66
<titleabbrev>Index lifecycle</titleabbrev>
77
++++
88

9-
{ilm-init} defines five index lifecycle _phases_:
9+
{ilm-init} defines four index lifecycle _phases_:
1010

1111
* **Hot**: The index is actively being updated and queried.
1212
* **Warm**: The index is no longer being updated but is still being queried.
1313
* **Cold**: The index is no longer being updated and is seldom queried. The
1414
information still needs to be searchable, but it's okay if those queries are
1515
slower.
16-
* **Frozen**: The index is no longer being updated and is seldom queried. The
17-
queries are performing longer-term analyses for which a slower response is
18-
acceptable.
1916
* **Delete**: The index is no longer needed and can safely be removed.
2017

2118
An index's _lifecycle policy_ specifies which phases
@@ -97,14 +94,6 @@ the rollover criteria, it could be 20 minutes before the rollover is complete.
9794
ifdef::permanently-unreleased-branch[]
9895
- <<ilm-searchable-snapshot, Searchable Snapshot>>
9996
endif::[]
100-
* Frozen
101-
- <<ilm-set-priority-action,Set Priority>>
102-
- <<ilm-unfollow-action,Unfollow>>
103-
- <<ilm-allocate,Allocate>>
104-
- <<ilm-freeze,Freeze>>
105-
ifdef::permanently-unreleased-branch[]
106-
- <<ilm-searchable-snapshot, Searchable Snapshot>>
107-
endif::[]
10897
* Delete
10998
- <<ilm-wait-for-snapshot-action,Wait For Snapshot>>
11099
- <<ilm-delete,Delete>>

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/DataTier.java

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
/**
2222
* The {@code DataTier} class encapsulates the formalization of the "content",
23-
* "hot", "warm", "cold", and "frozen" tiers as node roles. In contains the
23+
* "hot", "warm", and "cold" tiers as node roles. In contains the
2424
* roles themselves as well as helpers for validation and determining if a node
2525
* has a tier configured.
2626
*
@@ -33,7 +33,6 @@ public class DataTier {
3333
public static final String DATA_HOT = "data_hot";
3434
public static final String DATA_WARM = "data_warm";
3535
public static final String DATA_COLD = "data_cold";
36-
public static final String DATA_FROZEN = "data_frozen";
3736

3837
/**
3938
* Returns true if the given tier name is a valid tier
@@ -42,8 +41,7 @@ public static boolean validTierName(String tierName) {
4241
return DATA_CONTENT.equals(tierName) ||
4342
DATA_HOT.equals(tierName) ||
4443
DATA_WARM.equals(tierName) ||
45-
DATA_COLD.equals(tierName) ||
46-
DATA_FROZEN.equals(tierName);
44+
DATA_COLD.equals(tierName);
4745
}
4846

4947
/**
@@ -131,23 +129,6 @@ public boolean canContainData() {
131129
}
132130
};
133131

134-
public static DiscoveryNodeRole DATA_FROZEN_NODE_ROLE = new DiscoveryNodeRole("data_frozen", "f") {
135-
@Override
136-
public boolean isEnabledByDefault(final Settings settings) {
137-
return false;
138-
}
139-
140-
@Override
141-
public Setting<Boolean> legacySetting() {
142-
return null;
143-
}
144-
145-
@Override
146-
public boolean canContainData() {
147-
return true;
148-
}
149-
};
150-
151132
public static boolean isContentNode(DiscoveryNode discoveryNode) {
152133
return discoveryNode.getRoles().contains(DATA_CONTENT_NODE_ROLE) || discoveryNode.getRoles().contains(DiscoveryNodeRole.DATA_ROLE);
153134
}
@@ -164,10 +145,6 @@ public static boolean isColdNode(DiscoveryNode discoveryNode) {
164145
return discoveryNode.getRoles().contains(DATA_COLD_NODE_ROLE) || discoveryNode.getRoles().contains(DiscoveryNodeRole.DATA_ROLE);
165146
}
166147

167-
public static boolean isFrozenNode(DiscoveryNode discoveryNode) {
168-
return discoveryNode.getRoles().contains(DATA_FROZEN_NODE_ROLE) || discoveryNode.getRoles().contains(DiscoveryNodeRole.DATA_ROLE);
169-
}
170-
171148
/**
172149
* This setting provider injects the setting allocating all newly created indices with
173150
* {@code index.routing.allocation.include._tier: "data_hot"} unless the user overrides the

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/XPackPlugin.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,8 +426,7 @@ public Set<DiscoveryNodeRole> getRoles() {
426426
DataTier.DATA_CONTENT_NODE_ROLE,
427427
DataTier.DATA_HOT_NODE_ROLE,
428428
DataTier.DATA_WARM_NODE_ROLE,
429-
DataTier.DATA_COLD_NODE_ROLE,
430-
DataTier.DATA_FROZEN_NODE_ROLE));
429+
DataTier.DATA_COLD_NODE_ROLE));
431430
}
432431

433432
@Override

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ilm/TimeseriesLifecycleType.java

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,30 +34,25 @@ public class TimeseriesLifecycleType implements LifecycleType {
3434
static final String HOT_PHASE = "hot";
3535
static final String WARM_PHASE = "warm";
3636
static final String COLD_PHASE = "cold";
37-
static final String FROZEN_PHASE = "frozen";
3837
static final String DELETE_PHASE = "delete";
39-
static final List<String> VALID_PHASES = Arrays.asList(HOT_PHASE, WARM_PHASE, COLD_PHASE, FROZEN_PHASE, DELETE_PHASE);
38+
static final List<String> VALID_PHASES = Arrays.asList(HOT_PHASE, WARM_PHASE, COLD_PHASE, DELETE_PHASE);
4039
static final List<String> ORDERED_VALID_HOT_ACTIONS = Arrays.asList(SetPriorityAction.NAME, UnfollowAction.NAME, RolloverAction.NAME,
4140
ForceMergeAction.NAME);
4241
static final List<String> ORDERED_VALID_WARM_ACTIONS = Arrays.asList(SetPriorityAction.NAME, UnfollowAction.NAME, ReadOnlyAction.NAME,
4342
AllocateAction.NAME, ShrinkAction.NAME, ForceMergeAction.NAME);
4443
static final List<String> ORDERED_VALID_COLD_ACTIONS = Arrays.asList(SetPriorityAction.NAME, UnfollowAction.NAME, AllocateAction.NAME,
4544
FreezeAction.NAME, SearchableSnapshotAction.NAME);
46-
static final List<String> ORDERED_VALID_FROZEN_ACTIONS = Arrays.asList(SetPriorityAction.NAME, UnfollowAction.NAME, AllocateAction.NAME,
47-
FreezeAction.NAME, SearchableSnapshotAction.NAME);
4845
static final List<String> ORDERED_VALID_DELETE_ACTIONS = Arrays.asList(WaitForSnapshotAction.NAME, DeleteAction.NAME);
4946
static final Set<String> VALID_HOT_ACTIONS = Sets.newHashSet(ORDERED_VALID_HOT_ACTIONS);
5047
static final Set<String> VALID_WARM_ACTIONS = Sets.newHashSet(ORDERED_VALID_WARM_ACTIONS);
5148
static final Set<String> VALID_COLD_ACTIONS = Sets.newHashSet(ORDERED_VALID_COLD_ACTIONS);
52-
static final Set<String> VALID_FROZEN_ACTIONS = Sets.newHashSet(ORDERED_VALID_FROZEN_ACTIONS);
5349
static final Set<String> VALID_DELETE_ACTIONS = Sets.newHashSet(ORDERED_VALID_DELETE_ACTIONS);
5450
private static Map<String, Set<String>> ALLOWED_ACTIONS = new HashMap<>();
5551

5652
static {
5753
ALLOWED_ACTIONS.put(HOT_PHASE, VALID_HOT_ACTIONS);
5854
ALLOWED_ACTIONS.put(WARM_PHASE, VALID_WARM_ACTIONS);
5955
ALLOWED_ACTIONS.put(COLD_PHASE, VALID_COLD_ACTIONS);
60-
ALLOWED_ACTIONS.put(FROZEN_PHASE, VALID_FROZEN_ACTIONS);
6156
ALLOWED_ACTIONS.put(DELETE_PHASE, VALID_DELETE_ACTIONS);
6257
}
6358

@@ -146,9 +141,6 @@ public List<LifecycleAction> getOrderedActions(Phase phase) {
146141
case COLD_PHASE:
147142
return ORDERED_VALID_COLD_ACTIONS.stream().map(a -> actions.getOrDefault(a, null))
148143
.filter(Objects::nonNull).collect(Collectors.toList());
149-
case FROZEN_PHASE:
150-
return ORDERED_VALID_FROZEN_ACTIONS.stream().map(a -> actions.getOrDefault(a, null))
151-
.filter(Objects::nonNull).collect(Collectors.toList());
152144
case DELETE_PHASE:
153145
return ORDERED_VALID_DELETE_ACTIONS.stream().map(a -> actions.getOrDefault(a, null))
154146
.filter(Objects::nonNull).collect(Collectors.toList());
@@ -170,9 +162,6 @@ public String getNextActionName(String currentActionName, Phase phase) {
170162
case COLD_PHASE:
171163
orderedActionNames = ORDERED_VALID_COLD_ACTIONS;
172164
break;
173-
case FROZEN_PHASE:
174-
orderedActionNames = ORDERED_VALID_FROZEN_ACTIONS;
175-
break;
176165
case DELETE_PHASE:
177166
orderedActionNames = ORDERED_VALID_DELETE_ACTIONS;
178167
break;

0 commit comments

Comments
 (0)