Skip to content

Commit 552d485

Browse files
authored
Remove @UpdateForV9 annotation in 8.x (#125085)
The `8.x` branch need not track any v9-only changes now that we have v9-specific branches. Backporting code from 9.x to 8.x branches doesn't work anyway if it mentions `@UpdateForV9`. This commit just removes the `@UpdateForV9` annotation entirely in the `8.x` branch.
1 parent 9087f38 commit 552d485

File tree

86 files changed

+1
-249
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+1
-249
lines changed

libs/core/src/main/java/org/elasticsearch/core/RestApiVersion.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ public enum RestApiVersion {
2020

2121
V_8(8),
2222

23-
@UpdateForV9 // v9 will not need to support the v7 REST API
2423
V_7(7);
2524

2625
public final byte major;

libs/core/src/main/java/org/elasticsearch/core/UpdateForV9.java

Lines changed: 0 additions & 24 deletions
This file was deleted.

modules/ingest-attachment/src/main/java/org/elasticsearch/ingest/attachment/AttachmentProcessor.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
import org.elasticsearch.common.Strings;
1919
import org.elasticsearch.common.logging.DeprecationCategory;
2020
import org.elasticsearch.common.logging.DeprecationLogger;
21-
import org.elasticsearch.core.UpdateForV9;
2221
import org.elasticsearch.ingest.AbstractProcessor;
2322
import org.elasticsearch.ingest.IngestDocument;
2423
import org.elasticsearch.ingest.Processor;
@@ -241,7 +240,6 @@ public AttachmentProcessor create(
241240
int indexedChars = readIntProperty(TYPE, processorTag, config, "indexed_chars", NUMBER_OF_CHARS_INDEXED);
242241
boolean ignoreMissing = readBooleanProperty(TYPE, processorTag, config, "ignore_missing", false);
243242
String indexedCharsField = readOptionalStringProperty(TYPE, processorTag, config, "indexed_chars_field");
244-
@UpdateForV9 // update the [remove_binary] default to be 'true' assuming enough time has passed. Deprecated in September 2022.
245243
Boolean removeBinary = readOptionalBooleanProperty(TYPE, processorTag, config, "remove_binary");
246244
if (removeBinary == null) {
247245
DEPRECATION_LOGGER.warn(

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
import org.elasticsearch.common.settings.Setting;
2727
import org.elasticsearch.common.settings.Settings;
2828
import org.elasticsearch.core.TimeValue;
29-
import org.elasticsearch.core.UpdateForV9;
3029
import org.elasticsearch.gateway.GatewayService;
3130
import org.elasticsearch.index.Index;
3231
import org.elasticsearch.index.IndexSettings;
@@ -361,7 +360,6 @@ private static boolean isForeachProcessorWithGeoipProcessor(Map<String, Object>
361360
&& hasAtLeastOneGeoipProcessor((Map<String, Object>) processorConfig.get("processor"), downloadDatabaseOnPipelineCreation);
362361
}
363362

364-
@UpdateForV9 // use MINUS_ONE once that means no timeout
365363
private static final TimeValue MASTER_TIMEOUT = TimeValue.MAX_VALUE;
366364

367365
private void startTask(Runnable onFailure) {

qa/full-cluster-restart/src/javaRestTest/java/org/elasticsearch/upgrades/FullClusterRestartIT.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
import org.elasticsearch.common.xcontent.support.XContentMapValues;
3030
import org.elasticsearch.core.Booleans;
3131
import org.elasticsearch.core.CheckedFunction;
32-
import org.elasticsearch.core.UpdateForV9;
3332
import org.elasticsearch.index.IndexSettings;
3433
import org.elasticsearch.index.IndexVersion;
3534
import org.elasticsearch.index.IndexVersions;
@@ -1222,7 +1221,6 @@ public void testClosedIndices() throws Exception {
12221221
closeIndex(index);
12231222
}
12241223

1225-
@UpdateForV9 // This check can be removed (always assume true)
12261224
var originalClusterSupportsReplicationOfClosedIndices = oldClusterHasFeature(RestTestLegacyFeatures.REPLICATION_OF_CLOSED_INDICES);
12271225

12281226
if (originalClusterSupportsReplicationOfClosedIndices) {
@@ -1627,7 +1625,6 @@ public void testResize() throws Exception {
16271625
@SuppressWarnings("unchecked")
16281626
public void testSystemIndexMetadataIsUpgraded() throws Exception {
16291627

1630-
@UpdateForV9 // assumeTrue can be removed (condition always true)
16311628
var originalClusterTaskIndexIsSystemIndex = oldClusterHasFeature(RestTestLegacyFeatures.TASK_INDEX_SYSTEM_INDEX);
16321629
assumeTrue(".tasks became a system index in 7.10.0", originalClusterTaskIndexIsSystemIndex);
16331630
final String systemIndexWarning = "this request accesses system indices: [.tasks], but in a future major version, direct "
@@ -1748,7 +1745,6 @@ public void testSystemIndexMetadataIsUpgraded() throws Exception {
17481745
/**
17491746
* This test ensures that soft deletes are enabled a when upgrading a pre-8 cluster to 8.0+
17501747
*/
1751-
@UpdateForV9 // This test can be removed in v9
17521748
public void testEnableSoftDeletesOnRestore() throws Exception {
17531749
var originalClusterDidNotEnforceSoftDeletes = oldClusterHasFeature(RestTestLegacyFeatures.SOFT_DELETES_ENFORCED) == false;
17541750

@@ -1861,7 +1857,6 @@ public void testForbidDisableSoftDeletesOnRestore() throws Exception {
18611857
* with true/false as options. This test ensures that the old boolean setting in cluster state is
18621858
* translated properly. This test can be removed in 9.0.
18631859
*/
1864-
@UpdateForV9
18651860
public void testTransportCompressionSetting() throws IOException {
18661861
var originalClusterBooleanCompressSetting = oldClusterHasFeature(RestTestLegacyFeatures.NEW_TRANSPORT_COMPRESSED_SETTING) == false;
18671862
assumeTrue("the old transport.compress setting existed before 7.14", originalClusterBooleanCompressSetting);

qa/full-cluster-restart/src/javaRestTest/java/org/elasticsearch/upgrades/QueryBuilderBWCIT.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
import org.elasticsearch.common.io.stream.StreamInput;
2424
import org.elasticsearch.common.settings.Settings;
2525
import org.elasticsearch.common.unit.Fuzziness;
26-
import org.elasticsearch.core.UpdateForV9;
2726
import org.elasticsearch.index.query.BoolQueryBuilder;
2827
import org.elasticsearch.index.query.ConstantScoreQueryBuilder;
2928
import org.elasticsearch.index.query.DisMaxQueryBuilder;
@@ -249,8 +248,6 @@ public void testQueryBuilderBWC() throws Exception {
249248
InputStream in = new ByteArrayInputStream(qbSource, 0, qbSource.length);
250249
StreamInput input = new NamedWriteableAwareStreamInput(new InputStreamStreamInput(in), registry)
251250
) {
252-
253-
@UpdateForV9 // condition will always be true
254251
var originalClusterHasTransportVersion = oldClusterHasFeature(RestTestLegacyFeatures.TRANSPORT_VERSION_SUPPORTED);
255252
final TransportVersion transportVersion;
256253
if (originalClusterHasTransportVersion == false) {

qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/NodesCapabilitiesUpgradeIT.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,13 @@
1212
import com.carrotsearch.randomizedtesting.annotations.Name;
1313

1414
import org.elasticsearch.client.ResponseException;
15-
import org.elasticsearch.core.UpdateForV9;
1615
import org.junit.Before;
1716

1817
import java.io.IOException;
1918
import java.util.List;
2019

2120
import static org.elasticsearch.test.hamcrest.OptionalMatchers.isPresentWith;
2221

23-
@UpdateForV9
2422
public class NodesCapabilitiesUpgradeIT extends AbstractRollingUpgradeTestCase {
2523

2624
private static Boolean upgradingBeforeCapabilities;

qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/SystemIndexMappingUpgradeIT.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
import org.elasticsearch.client.Response;
1515
import org.elasticsearch.common.settings.Settings;
1616
import org.elasticsearch.core.SuppressForbidden;
17-
import org.elasticsearch.core.UpdateForV9;
1817
import org.elasticsearch.test.cluster.ElasticsearchCluster;
1918
import org.elasticsearch.test.cluster.local.distribution.DistributionType;
2019
import org.elasticsearch.test.cluster.util.Version;
@@ -107,7 +106,6 @@ private Map<String, Object> fieldAsObject(Map<? extends String, ?> objectMap, St
107106
return (Map<String, Object>) (objectMap.get(field));
108107
}
109108

110-
@UpdateForV9()
111109
public void testGrowShrinkUpgradeUpdatesSystemIndexMapping() throws Exception {
112110
/*
113111
* From 8.11, CompatibilityVersions holds a map of system index names to their mappings versions, alongside the transport version.

rest-api-spec/src/yamlRestTest/java/org/elasticsearch/test/rest/ClientYamlTestSuiteIT.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
import com.carrotsearch.randomizedtesting.annotations.TimeoutSuite;
1515

1616
import org.apache.lucene.tests.util.TimeUnits;
17-
import org.elasticsearch.core.UpdateForV9;
1817
import org.elasticsearch.test.cluster.ElasticsearchCluster;
1918
import org.elasticsearch.test.cluster.FeatureFlag;
2019
import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate;
@@ -43,7 +42,6 @@ public ClientYamlTestSuiteIT(@Name("yaml") ClientYamlTestCandidate testCandidate
4342
super(testCandidate);
4443
}
4544

46-
@UpdateForV9 // remove restCompat check
4745
@ParametersFactory
4846
public static Iterable<Object[]> parameters() throws Exception {
4947
String restCompatProperty = System.getProperty("tests.restCompat");

server/src/internalClusterTest/java/org/elasticsearch/gateway/ReplicaShardAllocatorSyncIdIT.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
import org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider;
1616
import org.elasticsearch.common.UUIDs;
1717
import org.elasticsearch.common.settings.Settings;
18-
import org.elasticsearch.core.UpdateForV9;
1918
import org.elasticsearch.index.Index;
2019
import org.elasticsearch.index.IndexService;
2120
import org.elasticsearch.index.IndexSettings;
@@ -62,7 +61,6 @@
6261
* that the {@link ReplicaShardAllocator} prefers copies with matching sync_id.
6362
*/
6463
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0)
65-
@UpdateForV9 // remove this test in v9
6664
public class ReplicaShardAllocatorSyncIdIT extends ESIntegTestCase {
6765

6866
private static final AtomicBoolean allowFlush = new AtomicBoolean();

0 commit comments

Comments
 (0)