Skip to content

Commit 546e8e9

Browse files
authored
Bump major version for feature migration system indices (#117243)
* Bump major version for feature upgrade system indices
1 parent 8cfe8f1 commit 546e8e9

File tree

5 files changed

+17
-16
lines changed

5 files changed

+17
-16
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
@@ -218,31 +218,31 @@ public void testMultipleFeatureMigration() throws Exception {
218218
// Finally, verify that all the indices exist and have the properties we expect.
219219
assertIndexHasCorrectProperties(
220220
finalMetadata,
221-
".int-man-old-reindexed-for-8",
221+
".int-man-old-reindexed-for-9",
222222
INTERNAL_MANAGED_FLAG_VALUE,
223223
true,
224224
true,
225225
Arrays.asList(".int-man-old", ".internal-managed-alias")
226226
);
227227
assertIndexHasCorrectProperties(
228228
finalMetadata,
229-
".int-unman-old-reindexed-for-8",
229+
".int-unman-old-reindexed-for-9",
230230
INTERNAL_UNMANAGED_FLAG_VALUE,
231231
false,
232232
true,
233233
Collections.singletonList(".int-unman-old")
234234
);
235235
assertIndexHasCorrectProperties(
236236
finalMetadata,
237-
".ext-man-old-reindexed-for-8",
237+
".ext-man-old-reindexed-for-9",
238238
EXTERNAL_MANAGED_FLAG_VALUE,
239239
true,
240240
false,
241241
Arrays.asList(".ext-man-old", ".external-managed-alias")
242242
);
243243
assertIndexHasCorrectProperties(
244244
finalMetadata,
245-
".ext-unman-old-reindexed-for-8",
245+
".ext-unman-old-reindexed-for-9",
246246
EXTERNAL_UNMANAGED_FLAG_VALUE,
247247
false,
248248
false,
@@ -251,7 +251,7 @@ public void testMultipleFeatureMigration() throws Exception {
251251

252252
assertIndexHasCorrectProperties(
253253
finalMetadata,
254-
".second-int-man-old-reindexed-for-8",
254+
".second-int-man-old-reindexed-for-9",
255255
SECOND_FEATURE_IDX_FLAG_VALUE,
256256
true,
257257
true,

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

Lines changed: 2 additions & 6 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;
@@ -56,15 +55,13 @@ public class TransportGetFeatureUpgradeStatusAction extends TransportMasterNodeA
5655
/**
5756
* Once all feature migrations for 8.x -> 9.x have been tested, we can bump this to Version.V_8_0_0
5857
*/
59-
@UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA)
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;
58+
public static final Version NO_UPGRADE_REQUIRED_VERSION = Version.V_8_0_0;
59+
public static final IndexVersion NO_UPGRADE_REQUIRED_INDEX_VERSION = IndexVersions.V_8_0_0;
6260

6361
private final SystemIndices systemIndices;
6462
PersistentTasksService persistentTasksService;
6563

6664
@Inject
67-
@UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA) // Once we begin working on 9.x, we need to update our migration classes
6865
public TransportGetFeatureUpgradeStatusAction(
6966
TransportService transportService,
7067
ThreadPool threadPool,
@@ -149,7 +146,6 @@ static GetFeatureUpgradeStatusResponse.FeatureUpgradeStatus getFeatureUpgradeSta
149146
.map(idxInfo -> ERROR)
150147
.map(idxStatus -> GetFeatureUpgradeStatusResponse.UpgradeStatus.combine(idxStatus, initialStatus))
151148
.orElse(initialStatus);
152-
153149
return new GetFeatureUpgradeStatusResponse.FeatureUpgradeStatus(featureName, minimumVersion, status, indexInfos);
154150
}
155151

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

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

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

0 commit comments

Comments
 (0)