Skip to content

Commit 04e04ce

Browse files
authored
Remove Version from system index descriptors (#115793)
Now it just uses mapping versions
1 parent 130cc74 commit 04e04ce

File tree

30 files changed

+14
-259
lines changed

30 files changed

+14
-259
lines changed

modules/ingest-geoip/src/main/java/org/elasticsearch/ingest/geoip/IngestGeoIpPlugin.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,6 @@ public Collection<SystemIndexDescriptor> getSystemIndexDescriptors(Settings sett
275275
.build()
276276
)
277277
.setOrigin(INGEST_ORIGIN)
278-
.setVersionMetaKey("version")
279278
.setPrimaryIndex(DATABASES_INDEX)
280279
.setNetNew()
281280
.build();

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

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,13 @@ public abstract class AbstractFeatureMigrationIntegTest extends ESIntegTestCase
7878
.setType(SystemIndexDescriptor.Type.EXTERNAL_UNMANAGED)
7979
.setOrigin(ORIGIN)
8080
.setAllowedElasticProductOrigins(Collections.singletonList(ORIGIN))
81-
.setMinimumNodeVersion(NEEDS_UPGRADE_VERSION)
8281
.setPriorSystemIndexDescriptors(Collections.emptyList())
8382
.build();
8483
static final SystemIndexDescriptor INTERNAL_UNMANAGED = SystemIndexDescriptor.builder()
8584
.setIndexPattern(".int-unman-*")
8685
.setType(SystemIndexDescriptor.Type.INTERNAL_UNMANAGED)
8786
.setOrigin(ORIGIN)
8887
.setAllowedElasticProductOrigins(Collections.emptyList())
89-
.setMinimumNodeVersion(NEEDS_UPGRADE_VERSION)
9088
.setPriorSystemIndexDescriptors(Collections.emptyList())
9189
.build();
9290

@@ -98,9 +96,7 @@ public abstract class AbstractFeatureMigrationIntegTest extends ESIntegTestCase
9896
.setSettings(createSettings(NEEDS_UPGRADE_INDEX_VERSION, INTERNAL_MANAGED_FLAG_VALUE))
9997
.setMappings(createMapping(true, true))
10098
.setOrigin(ORIGIN)
101-
.setVersionMetaKey(VERSION_META_KEY)
10299
.setAllowedElasticProductOrigins(Collections.emptyList())
103-
.setMinimumNodeVersion(NEEDS_UPGRADE_VERSION)
104100
.setPriorSystemIndexDescriptors(Collections.emptyList())
105101
.build();
106102
static final int INTERNAL_UNMANAGED_FLAG_VALUE = 2;
@@ -113,9 +109,7 @@ public abstract class AbstractFeatureMigrationIntegTest extends ESIntegTestCase
113109
.setSettings(createSettings(NEEDS_UPGRADE_INDEX_VERSION, EXTERNAL_MANAGED_FLAG_VALUE))
114110
.setMappings(createMapping(true, false))
115111
.setOrigin(ORIGIN)
116-
.setVersionMetaKey(VERSION_META_KEY)
117112
.setAllowedElasticProductOrigins(Collections.singletonList(ORIGIN))
118-
.setMinimumNodeVersion(NEEDS_UPGRADE_VERSION)
119113
.setPriorSystemIndexDescriptors(Collections.emptyList())
120114
.build();
121115
static final int EXTERNAL_UNMANAGED_FLAG_VALUE = 4;
@@ -128,7 +122,6 @@ public abstract class AbstractFeatureMigrationIntegTest extends ESIntegTestCase
128122
.setType(SystemIndexDescriptor.Type.EXTERNAL_UNMANAGED)
129123
.setAllowedElasticProductOrigins(Collections.emptyList())
130124
.setAllowedElasticProductOrigins(Collections.singletonList(ORIGIN))
131-
.setMinimumNodeVersion(NEEDS_UPGRADE_VERSION)
132125
.setPriorSystemIndexDescriptors(Collections.emptyList())
133126
.setAllowsTemplates()
134127
.build();

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
package org.elasticsearch.migration;
1111

1212
import org.apache.lucene.util.SetOnce;
13-
import org.elasticsearch.Version;
1413
import org.elasticsearch.action.ActionListener;
1514
import org.elasticsearch.action.admin.cluster.migration.GetFeatureUpgradeStatusAction;
1615
import org.elasticsearch.action.admin.cluster.migration.GetFeatureUpgradeStatusRequest;
@@ -268,9 +267,7 @@ public void testMultipleFeatureMigration() throws Exception {
268267
.setSettings(createSettings(IndexVersions.MINIMUM_COMPATIBLE, 0))
269268
.setMappings(createMapping(true, true))
270269
.setOrigin(ORIGIN)
271-
.setVersionMetaKey(VERSION_META_KEY)
272270
.setAllowedElasticProductOrigins(Collections.emptyList())
273-
.setMinimumNodeVersion(Version.CURRENT.minimumCompatibilityVersion())
274271
.setPriorSystemIndexDescriptors(Collections.emptyList())
275272
.build();
276273

qa/smoke-test-http/src/javaRestTest/java/org/elasticsearch/http/SystemIndexRestIT.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,6 @@ public Collection<SystemIndexDescriptor> getSystemIndexDescriptors(Settings sett
196196
.setPrimaryIndex(SYSTEM_INDEX_NAME)
197197
.setDescription("Test system index")
198198
.setOrigin(getClass().getName())
199-
.setVersionMetaKey("version")
200199
.setMappings(builder)
201200
.setSettings(SETTINGS)
202201
.setType(Type.INTERNAL_MANAGED)

qa/system-indices/src/main/java/org/elasticsearch/system/indices/SystemIndicesQA.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ public Collection<SystemIndexDescriptor> getSystemIndexDescriptors(Settings sett
7777
.build()
7878
)
7979
.setOrigin(TASKS_ORIGIN)
80-
.setVersionMetaKey("version")
8180
.setPrimaryIndex(".net-new-system-index-primary")
8281
.build(),
8382
SystemIndexDescriptor.builder()
@@ -99,7 +98,6 @@ public Collection<SystemIndexDescriptor> getSystemIndexDescriptors(Settings sett
9998
.build()
10099
)
101100
.setOrigin(TASKS_ORIGIN)
102-
.setVersionMetaKey("version")
103101
.setPrimaryIndex(".internal-managed-index-primary")
104102
.setAliasName(".internal-managed-alias")
105103
.build()

server/src/internalClusterTest/java/org/elasticsearch/aliases/NetNewSystemIndexAliasIT.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ public Collection<SystemIndexDescriptor> getSystemIndexDescriptors(Settings sett
8989
.setPrimaryIndex(SYSTEM_INDEX_NAME)
9090
.setDescription("Test system index")
9191
.setOrigin(getClass().getName())
92-
.setVersionMetaKey("version")
9392
.setMappings(builder)
9493
.setSettings(SETTINGS)
9594
.setType(SystemIndexDescriptor.Type.INTERNAL_MANAGED)

server/src/internalClusterTest/java/org/elasticsearch/indices/TestSystemIndexDescriptor.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
package org.elasticsearch.indices;
1111

12-
import org.elasticsearch.Build;
1312
import org.elasticsearch.Version;
1413
import org.elasticsearch.cluster.metadata.IndexMetadata;
1514
import org.elasticsearch.common.Strings;
@@ -51,9 +50,7 @@ public class TestSystemIndexDescriptor extends SystemIndexDescriptor {
5150
SETTINGS,
5251
INDEX_NAME,
5352
0,
54-
"version",
5553
"stack",
56-
null,
5754
Type.INTERNAL_MANAGED,
5855
List.of(),
5956
List.of(),
@@ -72,9 +69,7 @@ public class TestSystemIndexDescriptor extends SystemIndexDescriptor {
7269
SETTINGS,
7370
name,
7471
0,
75-
"version",
7672
"stack",
77-
Version.fromString(Build.current().minWireCompatVersion()),
7873
Type.INTERNAL_MANAGED,
7974
List.of(),
8075
List.of(),

0 commit comments

Comments
 (0)