Skip to content

Commit f4721ca

Browse files
authored
Bump major version for feature migration system indices (#117243) (#117311)
* Bump major version for feature upgrade system indices (cherry picked from commit 546e8e9) # Conflicts: # server/src/main/java/org/elasticsearch/action/admin/cluster/migration/TransportGetFeatureUpgradeStatusAction.java
1 parent a3de906 commit f4721ca

File tree

5 files changed

+17
-19
lines changed

5 files changed

+17
-19
lines changed

docs/changelog/117243.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 117243
2+
summary: Bump major version for feature migration system indices
3+
area: Infra/Core
4+
type: upgrade
5+
issues: []

modules/reindex/src/internalClusterTest/java/org/elasticsearch/migration/FeatureMigrationIT.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,31 +208,31 @@ public void testMigrateInternalManagedSystemIndex() throws Exception {
208208

209209
assertIndexHasCorrectProperties(
210210
finalMetadata,
211-
".int-man-old-reindexed-for-8",
211+
".int-man-old-reindexed-for-9",
212212
INTERNAL_MANAGED_FLAG_VALUE,
213213
true,
214214
true,
215215
Arrays.asList(".int-man-old", ".internal-managed-alias")
216216
);
217217
assertIndexHasCorrectProperties(
218218
finalMetadata,
219-
".int-unman-old-reindexed-for-8",
219+
".int-unman-old-reindexed-for-9",
220220
INTERNAL_UNMANAGED_FLAG_VALUE,
221221
false,
222222
true,
223223
Collections.singletonList(".int-unman-old")
224224
);
225225
assertIndexHasCorrectProperties(
226226
finalMetadata,
227-
".ext-man-old-reindexed-for-8",
227+
".ext-man-old-reindexed-for-9",
228228
EXTERNAL_MANAGED_FLAG_VALUE,
229229
true,
230230
false,
231231
Arrays.asList(".ext-man-old", ".external-managed-alias")
232232
);
233233
assertIndexHasCorrectProperties(
234234
finalMetadata,
235-
".ext-unman-old-reindexed-for-8",
235+
".ext-unman-old-reindexed-for-9",
236236
EXTERNAL_UNMANAGED_FLAG_VALUE,
237237
false,
238238
false,

modules/reindex/src/internalClusterTest/java/org/elasticsearch/migration/MultiFeatureMigrationIT.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -219,31 +219,31 @@ public void testMultipleFeatureMigration() throws Exception {
219219
// Finally, verify that all the indices exist and have the properties we expect.
220220
assertIndexHasCorrectProperties(
221221
finalMetadata,
222-
".int-man-old-reindexed-for-8",
222+
".int-man-old-reindexed-for-9",
223223
INTERNAL_MANAGED_FLAG_VALUE,
224224
true,
225225
true,
226226
Arrays.asList(".int-man-old", ".internal-managed-alias")
227227
);
228228
assertIndexHasCorrectProperties(
229229
finalMetadata,
230-
".int-unman-old-reindexed-for-8",
230+
".int-unman-old-reindexed-for-9",
231231
INTERNAL_UNMANAGED_FLAG_VALUE,
232232
false,
233233
true,
234234
Collections.singletonList(".int-unman-old")
235235
);
236236
assertIndexHasCorrectProperties(
237237
finalMetadata,
238-
".ext-man-old-reindexed-for-8",
238+
".ext-man-old-reindexed-for-9",
239239
EXTERNAL_MANAGED_FLAG_VALUE,
240240
true,
241241
false,
242242
Arrays.asList(".ext-man-old", ".external-managed-alias")
243243
);
244244
assertIndexHasCorrectProperties(
245245
finalMetadata,
246-
".ext-unman-old-reindexed-for-8",
246+
".ext-unman-old-reindexed-for-9",
247247
EXTERNAL_UNMANAGED_FLAG_VALUE,
248248
false,
249249
false,
@@ -252,7 +252,7 @@ public void testMultipleFeatureMigration() throws Exception {
252252

253253
assertIndexHasCorrectProperties(
254254
finalMetadata,
255-
".second-int-man-old-reindexed-for-8",
255+
".second-int-man-old-reindexed-for-9",
256256
SECOND_FEATURE_IDX_FLAG_VALUE,
257257
true,
258258
true,

server/src/main/java/org/elasticsearch/action/admin/cluster/migration/TransportGetFeatureUpgradeStatusAction.java

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
2020
import org.elasticsearch.cluster.service.ClusterService;
2121
import org.elasticsearch.common.util.concurrent.EsExecutors;
22-
import org.elasticsearch.core.UpdateForV9;
2322
import org.elasticsearch.index.IndexVersion;
2423
import org.elasticsearch.index.IndexVersions;
2524
import org.elasticsearch.indices.SystemIndices;
@@ -53,18 +52,13 @@ public class TransportGetFeatureUpgradeStatusAction extends TransportMasterNodeA
5352
GetFeatureUpgradeStatusRequest,
5453
GetFeatureUpgradeStatusResponse> {
5554

56-
/**
57-
* Once all feature migrations for 8.x -> 9.x have been tested, we can bump this to Version.V_8_0_0
58-
*/
59-
@UpdateForV9
60-
public static final Version NO_UPGRADE_REQUIRED_VERSION = Version.V_7_0_0;
61-
public static final IndexVersion NO_UPGRADE_REQUIRED_INDEX_VERSION = IndexVersions.V_7_0_0;
55+
public static final Version NO_UPGRADE_REQUIRED_VERSION = Version.V_8_0_0;
56+
public static final IndexVersion NO_UPGRADE_REQUIRED_INDEX_VERSION = IndexVersions.V_8_0_0;
6257

6358
private final SystemIndices systemIndices;
6459
PersistentTasksService persistentTasksService;
6560

6661
@Inject
67-
@UpdateForV9 // Once we begin working on 9.x, we need to update our migration classes
6862
public TransportGetFeatureUpgradeStatusAction(
6963
TransportService transportService,
7064
ThreadPool threadPool,
@@ -149,7 +143,6 @@ static GetFeatureUpgradeStatusResponse.FeatureUpgradeStatus getFeatureUpgradeSta
149143
.map(idxInfo -> ERROR)
150144
.map(idxStatus -> GetFeatureUpgradeStatusResponse.UpgradeStatus.combine(idxStatus, initialStatus))
151145
.orElse(initialStatus);
152-
153146
return new GetFeatureUpgradeStatusResponse.FeatureUpgradeStatus(featureName, minimumVersion, status, indexInfos);
154147
}
155148

server/src/main/java/org/elasticsearch/indices/SystemIndices.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@
111111
public class SystemIndices {
112112
public static final String SYSTEM_INDEX_ACCESS_CONTROL_HEADER_KEY = "_system_index_access_allowed";
113113
public static final String EXTERNAL_SYSTEM_INDEX_ACCESS_CONTROL_HEADER_KEY = "_external_system_index_access_origin";
114-
public static final String UPGRADED_INDEX_SUFFIX = "-reindexed-for-8";
114+
public static final String UPGRADED_INDEX_SUFFIX = "-reindexed-for-9";
115115

116116
private static final Automaton EMPTY = Automata.makeEmpty();
117117

0 commit comments

Comments
 (0)