diff --git a/docs/internal/Versioning.md b/docs/internal/Versioning.md index 4a887f4caca86..ac583e15d27d8 100644 --- a/docs/internal/Versioning.md +++ b/docs/internal/Versioning.md @@ -85,25 +85,6 @@ usually after each new minor release, to collapse the transport versions for the previous minor release. An example of such an operation can be found [here](https://github.com/elastic/elasticsearch/pull/104937). -#### Tips - -- We collapse versions only on the `main` branch. -- Use [TransportVersions.csv](../../server/src/main/resources/org/elasticsearch/TransportVersions.csv) as your guide. -- For each release version listed in that file with a corresponding `INITIAL_ELASTICSEARCH_` entry corresponding to that version, - - change the prefix to `V_` - - replace all intervening entries since the previous patch `V_` entry with the new `V_` entry - - look at all uses of the new `V_` entry and look for dead code that can be deleted - -For example, if there's a version `1.2.3` in the CSV file, -and `TransportVersions.java` has an entry called `INITIAL_ELASTICSEARCH_1_2_3`, -then: -- rename it to `V_1_2_3`, -- replace any other intervening symbols between `V_1_2_2` and `V_1_2_3` with `V_1_2_3` itself, and -- look through all the uses of the new `V_1_2_3` symbol; if any contain dead code, simplify it. - -When in doubt, you can always leave the code as-is. -This is an optional cleanup step that is never required for correctness. - ### Minimum compatibility versions The transport version used between two nodes is determined by the initial handshake diff --git a/server/src/main/java/org/elasticsearch/TransportVersions.java b/server/src/main/java/org/elasticsearch/TransportVersions.java index 87940a814d8ce..574a468dd209c 100644 --- a/server/src/main/java/org/elasticsearch/TransportVersions.java +++ b/server/src/main/java/org/elasticsearch/TransportVersions.java @@ -85,12 +85,12 @@ static TransportVersion def(int id) { public static final TransportVersion V_8_15_2 = def(8_702_0_03); public static final TransportVersion V_8_16_0 = def(8_772_0_01); public static final TransportVersion V_8_16_1 = def(8_772_0_04); - public static final TransportVersion V_8_16_5 = def(8_772_0_05); - public static final TransportVersion V_8_16_6 = def(8_772_0_06); + public static final TransportVersion INITIAL_ELASTICSEARCH_8_16_5 = def(8_772_0_05); + public static final TransportVersion INITIAL_ELASTICSEARCH_8_16_6 = def(8_772_0_06); public static final TransportVersion V_8_17_0 = def(8_797_0_02); - public static final TransportVersion V_8_17_3 = def(8_797_0_03); - public static final TransportVersion V_8_17_4 = def(8_797_0_04); - public static final TransportVersion V_8_17_5 = def(8_797_0_05); + public static final TransportVersion INITIAL_ELASTICSEARCH_8_17_3 = def(8_797_0_03); + public static final TransportVersion INITIAL_ELASTICSEARCH_8_17_4 = def(8_797_0_04); + public static final TransportVersion INITIAL_ELASTICSEARCH_8_17_5 = def(8_797_0_05); public static final TransportVersion INDEXING_PRESSURE_THROTTLING_STATS = def(8_798_0_00); public static final TransportVersion REINDEX_DATA_STREAMS = def(8_799_0_00); public static final TransportVersion ESQL_REMOVE_NODE_LEVEL_PLAN = def(8_800_0_00); @@ -135,7 +135,7 @@ static TransportVersion def(int id) { public static final TransportVersion INFERENCE_REQUEST_ADAPTIVE_RATE_LIMITING = def(8_839_0_00); public static final TransportVersion ML_INFERENCE_IBM_WATSONX_RERANK_ADDED = def(8_840_0_00); public static final TransportVersion REMOVE_ALL_APPLICABLE_SELECTOR_BACKPORT_8_18 = def(8_840_0_01); - public static final TransportVersion V_8_18_0 = def(8_840_0_02); + public static final TransportVersion RETRY_ILM_ASYNC_ACTION_REQUIRE_ERROR_8_18 = def(8_840_0_02); public static final TransportVersion INITIAL_ELASTICSEARCH_8_18_7 = def(8_840_0_09); public static final TransportVersion INITIAL_ELASTICSEARCH_8_19 = def(8_841_0_00); public static final TransportVersion COHERE_BIT_EMBEDDING_TYPE_SUPPORT_ADDED_BACKPORT_8_X = def(8_841_0_01); @@ -202,7 +202,16 @@ static TransportVersion def(int id) { public static final TransportVersion ESQL_SPLIT_ON_BIG_VALUES_8_19 = def(8_841_0_63); public static final TransportVersion ESQL_FIXED_INDEX_LIKE_8_19 = def(8_841_0_64); public static final TransportVersion INITIAL_ELASTICSEARCH_8_19_4 = def(8_841_0_68); - public static final TransportVersion V_9_0_0 = def(9_000_0_09); + public static final TransportVersion INITIAL_ELASTICSEARCH_9_0 = def(9_000_0_00); + public static final TransportVersion REMOVE_SNAPSHOT_FAILURES_90 = def(9_000_0_01); + public static final TransportVersion TRANSPORT_STATS_HANDLING_TIME_REQUIRED_90 = def(9_000_0_02); + public static final TransportVersion REMOVE_DESIRED_NODE_VERSION_90 = def(9_000_0_03); + public static final TransportVersion ESQL_DRIVER_TASK_DESCRIPTION_90 = def(9_000_0_04); + public static final TransportVersion REMOVE_ALL_APPLICABLE_SELECTOR_9_0 = def(9_000_0_05); + public static final TransportVersion BYTE_SIZE_VALUE_ALWAYS_USES_BYTES_90 = def(9_000_0_06); + public static final TransportVersion RETRY_ILM_ASYNC_ACTION_REQUIRE_ERROR_90 = def(9_000_0_07); + public static final TransportVersion RE_REMOVE_MIN_COMPATIBLE_SHARD_NODE_90 = def(9_000_0_08); + public static final TransportVersion STORED_SCRIPT_CONTENT_LENGTH_90 = def(9_000_0_09); public static final TransportVersion INITIAL_ELASTICSEARCH_9_0_7 = def(9_000_0_16); public static final TransportVersion COHERE_BIT_EMBEDDING_TYPE_SUPPORT_ADDED = def(9_001_0_00); public static final TransportVersion REMOVE_SNAPSHOT_FAILURES = def(9_002_0_00); diff --git a/server/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/get/GetSnapshotsResponse.java b/server/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/get/GetSnapshotsResponse.java index 57c05e1d0457a..797d95529ee23 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/get/GetSnapshotsResponse.java +++ b/server/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/get/GetSnapshotsResponse.java @@ -50,7 +50,7 @@ public GetSnapshotsResponse(List snapshots, @Nullable String next, public GetSnapshotsResponse(StreamInput in) throws IOException { this.snapshots = in.readCollectionAsImmutableList(SnapshotInfo::readFrom); if (in.getTransportVersion().before(TransportVersions.REMOVE_SNAPSHOT_FAILURES) - && in.getTransportVersion().isPatchFrom(TransportVersions.V_9_0_0) == false) { + && in.getTransportVersion().isPatchFrom(TransportVersions.REMOVE_SNAPSHOT_FAILURES_90) == false) { // Deprecated `failures` field in.readMap(StreamInput::readException); } @@ -85,7 +85,7 @@ public int remaining() { public void writeTo(StreamOutput out) throws IOException { out.writeCollection(snapshots); if (out.getTransportVersion().before(TransportVersions.REMOVE_SNAPSHOT_FAILURES) - && out.getTransportVersion().isPatchFrom(TransportVersions.V_9_0_0) == false) { + && out.getTransportVersion().isPatchFrom(TransportVersions.REMOVE_SNAPSHOT_FAILURES_90) == false) { // Deprecated `failures` field out.writeMap(Map.of(), StreamOutput::writeException); } diff --git a/server/src/main/java/org/elasticsearch/action/admin/cluster/storedscripts/PutStoredScriptRequest.java b/server/src/main/java/org/elasticsearch/action/admin/cluster/storedscripts/PutStoredScriptRequest.java index 965efce0aae00..be44633d7c76d 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/cluster/storedscripts/PutStoredScriptRequest.java +++ b/server/src/main/java/org/elasticsearch/action/admin/cluster/storedscripts/PutStoredScriptRequest.java @@ -45,7 +45,7 @@ public class PutStoredScriptRequest extends AcknowledgedRequest