diff --git a/buildSrc/version.properties b/buildSrc/version.properties index d0a93edd836..21f4d8586e1 100644 --- a/buildSrc/version.properties +++ b/buildSrc/version.properties @@ -1,4 +1,4 @@ -elasticsearch = 7.1.0 +elasticsearch = 7.2.0 lucene = 8.0.0 bundled_jdk = 12.0.1+12@69cfe15208a647278a19ef0990eea691 diff --git a/docs/Versions.asciidoc b/docs/Versions.asciidoc index aef15bdf50b..b949b3a9ea7 100644 --- a/docs/Versions.asciidoc +++ b/docs/Versions.asciidoc @@ -1,8 +1,8 @@ -:version: 7.1.0 +:version: 7.2.0 //// bare_version never includes -alpha or -beta //// -:bare_version: 7.1.0 +:bare_version: 7.2.0 :major-version: 7.x :prev-major-version: 6.x :lucene_version: 8.0.0 diff --git a/docs/reference/release-notes/highlights.asciidoc b/docs/reference/release-notes/highlights.asciidoc index 38501b4a795..de4ed91d862 100644 --- a/docs/reference/release-notes/highlights.asciidoc +++ b/docs/reference/release-notes/highlights.asciidoc @@ -6,10 +6,12 @@ This section summarizes the most important changes in each release. For the full list, see <> and <>. +* <> * <> * <> -- +include::highlights-7.2.0.asciidoc[] include::highlights-7.1.0.asciidoc[] include::highlights-7.0.0.asciidoc[] \ No newline at end of file diff --git a/modules/analysis-common/src/test/resources/rest-api-spec/test/search.query/70_intervals.yml b/modules/analysis-common/src/test/resources/rest-api-spec/test/search.query/70_intervals.yml index e427a27d067..35a611d13f3 100644 --- a/modules/analysis-common/src/test/resources/rest-api-spec/test/search.query/70_intervals.yml +++ b/modules/analysis-common/src/test/resources/rest-api-spec/test/search.query/70_intervals.yml @@ -23,8 +23,8 @@ setup: --- "Test use_field": - skip: - version: " - 7.9.99" # TODO change to 7.0.99 after backport - reason: "Implemented in 7.1" + version: " - 7.1.99" + reason: "Implemented in 7.2" - do: search: index: test diff --git a/modules/mapper-extras/src/test/resources/rest-api-spec/test/dense-vector/10_basic.yml b/modules/mapper-extras/src/test/resources/rest-api-spec/test/dense-vector/10_basic.yml index e5db535b69b..320d9ce1fa3 100644 --- a/modules/mapper-extras/src/test/resources/rest-api-spec/test/dense-vector/10_basic.yml +++ b/modules/mapper-extras/src/test/resources/rest-api-spec/test/dense-vector/10_basic.yml @@ -1,8 +1,8 @@ setup: - skip: features: headers - version: " - 7.0.99" - reason: "dense_vector functions were introduced in 7.1.0" + version: " - 7.1.99" + reason: "dense_vector functions were introduced in 7.2.0" - do: indices.create: diff --git a/modules/mapper-extras/src/test/resources/rest-api-spec/test/dense-vector/20_special_cases.yml b/modules/mapper-extras/src/test/resources/rest-api-spec/test/dense-vector/20_special_cases.yml index 0b6cab59900..67091a117de 100644 --- a/modules/mapper-extras/src/test/resources/rest-api-spec/test/dense-vector/20_special_cases.yml +++ b/modules/mapper-extras/src/test/resources/rest-api-spec/test/dense-vector/20_special_cases.yml @@ -1,8 +1,8 @@ setup: - skip: features: headers - version: " - 7.0.99" - reason: "dense_vector functions were introduced in 7.1.0" + version: " - 7.1.99" + reason: "dense_vector functions were introduced in 7.2.0" - do: indices.create: diff --git a/modules/mapper-extras/src/test/resources/rest-api-spec/test/search-as-you-type/10_basic.yml b/modules/mapper-extras/src/test/resources/rest-api-spec/test/search-as-you-type/10_basic.yml index f9b76a7399a..ffe05097748 100644 --- a/modules/mapper-extras/src/test/resources/rest-api-spec/test/search-as-you-type/10_basic.yml +++ b/modules/mapper-extras/src/test/resources/rest-api-spec/test/search-as-you-type/10_basic.yml @@ -1,7 +1,7 @@ setup: - skip: - version: " - 7.1.0" - reason: "added in 7.1.0" + version: " - 7.1.99" + reason: "added in 7.2.0" - do: indices.create: diff --git a/modules/mapper-extras/src/test/resources/rest-api-spec/test/search-as-you-type/20_highlighting.yml b/modules/mapper-extras/src/test/resources/rest-api-spec/test/search-as-you-type/20_highlighting.yml index 5a96a11a475..b09bc8418c9 100644 --- a/modules/mapper-extras/src/test/resources/rest-api-spec/test/search-as-you-type/20_highlighting.yml +++ b/modules/mapper-extras/src/test/resources/rest-api-spec/test/search-as-you-type/20_highlighting.yml @@ -1,7 +1,7 @@ setup: - skip: - version: " - 7.1.0" - reason: "added in 7.1.0" + version: " - 7.1.99" + reason: "added in 7.2.0" - do: indices.create: diff --git a/modules/mapper-extras/src/test/resources/rest-api-spec/test/sparse-vector/10_basic.yml b/modules/mapper-extras/src/test/resources/rest-api-spec/test/sparse-vector/10_basic.yml index 142a80291ae..b1330bbe852 100644 --- a/modules/mapper-extras/src/test/resources/rest-api-spec/test/sparse-vector/10_basic.yml +++ b/modules/mapper-extras/src/test/resources/rest-api-spec/test/sparse-vector/10_basic.yml @@ -1,8 +1,8 @@ setup: - skip: features: headers - version: " - 7.0.99" - reason: "sparse_vector functions were introduced in 7.1.0" + version: " - 7.1.99" + reason: "sparse_vector functions were introduced in 7.2.0" - do: indices.create: diff --git a/modules/mapper-extras/src/test/resources/rest-api-spec/test/sparse-vector/20_special_cases.yml b/modules/mapper-extras/src/test/resources/rest-api-spec/test/sparse-vector/20_special_cases.yml index 106a3d966a4..b9f12d1a8a8 100644 --- a/modules/mapper-extras/src/test/resources/rest-api-spec/test/sparse-vector/20_special_cases.yml +++ b/modules/mapper-extras/src/test/resources/rest-api-spec/test/sparse-vector/20_special_cases.yml @@ -1,8 +1,8 @@ setup: - skip: features: headers - version: " - 7.0.99" - reason: "sparse_vector functions were introduced in 7.1.0" + version: " - 7.1.99" + reason: "sparse_vector functions were introduced in 7.2.0" - do: indices.create: diff --git a/qa/full-cluster-restart/src/test/java/org/elasticsearch/upgrades/FullClusterRestartIT.java b/qa/full-cluster-restart/src/test/java/org/elasticsearch/upgrades/FullClusterRestartIT.java index ce72a7781c2..7451619ecbd 100644 --- a/qa/full-cluster-restart/src/test/java/org/elasticsearch/upgrades/FullClusterRestartIT.java +++ b/qa/full-cluster-restart/src/test/java/org/elasticsearch/upgrades/FullClusterRestartIT.java @@ -1058,7 +1058,7 @@ public class FullClusterRestartIT extends AbstractFullClusterRestartTestCase { closeIndex(index); } - if (getOldClusterVersion().onOrAfter(Version.V_7_1_0)) { + if (getOldClusterVersion().onOrAfter(Version.V_7_2_0)) { ensureGreenLongWait(index); assertClosedIndex(index, true); } else { diff --git a/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/RecoveryIT.java b/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/RecoveryIT.java index 40ecb789352..588393a19c1 100644 --- a/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/RecoveryIT.java +++ b/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/RecoveryIT.java @@ -365,7 +365,7 @@ public class RecoveryIT extends AbstractRollingTestCase { } final Version indexVersionCreated = indexVersionCreated(indexName); - if (indexVersionCreated.onOrAfter(Version.V_7_1_0)) { + if (indexVersionCreated.onOrAfter(Version.V_7_2_0)) { // index was created on a version that supports the replication of closed indices, // so we expect the index to be closed and replicated ensureGreen(indexName); @@ -398,7 +398,7 @@ public class RecoveryIT extends AbstractRollingTestCase { closeIndex(indexName); } - if (minimumNodeVersion.onOrAfter(Version.V_7_1_0)) { + if (minimumNodeVersion.onOrAfter(Version.V_7_2_0)) { // index is created on a version that supports the replication of closed indices, // so we expect the index to be closed and replicated ensureGreen(indexName); diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/cat.indices/10_basic.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/cat.indices/10_basic.yml index 4b2ca68102f..4da58c2ed4d 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/cat.indices/10_basic.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/cat.indices/10_basic.yml @@ -50,10 +50,10 @@ ) $/ --- -"Test cat indices output for closed index (pre 7.1.0)": +"Test cat indices output for closed index (pre 7.2.0)": - skip: - version: "7.1.0 - " - reason: "closed indices are replicated starting version 7.1.0" + version: "7.2.0 - " + reason: "closed indices are replicated starting version 7.2.0" - do: indices.create: @@ -93,8 +93,8 @@ --- "Test cat indices output for closed index": - skip: - version: " - 7.0.99" - reason: "closed indices are replicated starting version 7.1.0" + version: " - 7.1.99" + reason: "closed indices are replicated starting version 7.2.0" - do: indices.create: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/cat.recovery/10_basic.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/cat.recovery/10_basic.yml index c6a752c2b7e..ef1272322e9 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/cat.recovery/10_basic.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/cat.recovery/10_basic.yml @@ -79,8 +79,8 @@ --- "Test cat recovery output for closed index": - skip: - version: " - 7.0.99" - reason: closed indices are replicated starting version 7.1.0 + version: " - 7.1.99" + reason: closed indices are replicated starting version 7.2.0 - do: indices.create: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/cat.shards/10_basic.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/cat.shards/10_basic.yml index 884cf45c84c..6632d912cd5 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/cat.shards/10_basic.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/cat.shards/10_basic.yml @@ -1,8 +1,8 @@ --- "Help": - skip: - version: " - 7.0.99" - reason: external refresh stats were added in 7.1.0 + version: " - 7.1.99" + reason: external refresh stats were added in 7.2.0 - do: cat.shards: help: true diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/cluster.allocation_explain/10_basic.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/cluster.allocation_explain/10_basic.yml index 732a53aeea4..f0fdca695b8 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/cluster.allocation_explain/10_basic.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/cluster.allocation_explain/10_basic.yml @@ -50,8 +50,8 @@ --- "Cluster shard allocation explanation test with a closed index": - skip: - version: " - 7.0.99" - reason: closed indices are replicated starting version 7.1.0 + version: " - 7.1.99" + reason: closed indices are replicated starting version 7.2.0 - do: indices.create: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/cluster.health/10_basic.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/cluster.health/10_basic.yml index 01c82623ef0..aa6c96202ea 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/cluster.health/10_basic.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/cluster.health/10_basic.yml @@ -133,10 +133,10 @@ - is_true: indices.test_index.shards --- -"cluster health with closed index (pre 7.1.0)": +"cluster health with closed index (pre 7.2.0)": - skip: - version: "7.1.0 - " - reason: "closed indices are replicated starting version 7.1.0" + version: "7.2.0 - " + reason: "closed indices are replicated starting version 7.2.0" - do: indices.create: @@ -209,8 +209,8 @@ --- "cluster health with closed index": - skip: - version: " - 7.0.99" - reason: "closed indices are replicated starting version 7.1.0" + version: " - 7.1.99" + reason: "closed indices are replicated starting version 7.2.0" - do: indices.create: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/cluster.health/30_indices_options.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/cluster.health/30_indices_options.yml index 646d6ff6fea..93ca5da19d2 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/cluster.health/30_indices_options.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/cluster.health/30_indices_options.yml @@ -31,8 +31,8 @@ setup: --- "cluster health with expand_wildcards": - skip: - version: " - 7.0.99" - reason: "indices options has been introduced in cluster health request starting version 7.1.0" + version: " - 7.1.99" + reason: "indices options has been introduced in cluster health request starting version 7.2.0" - do: cluster.health: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/cluster.stats/10_basic.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/cluster.stats/10_basic.yml index 3b7892e0c03..f97eef77b4e 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/cluster.stats/10_basic.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/cluster.stats/10_basic.yml @@ -82,8 +82,8 @@ "get cluster stats returns packaging types": - skip: - version: " - 7.0.99" - reason: "packaging types are added for v7.1.0" + version: " - 7.1.99" + reason: "packaging types are added for v7.2.0" - do: cluster.stats: {} diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/field_caps/10_basic.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/field_caps/10_basic.yml index 74fbba14f92..281ca346761 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/field_caps/10_basic.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/field_caps/10_basic.yml @@ -303,8 +303,8 @@ setup: --- "Field caps with include_unmapped": - skip: - version: " - 7.0.99" - reason: include_unmapped has been added in 7.1.0 + version: " - 7.1.99" + reason: include_unmapped has been added in 7.2.0 - do: field_caps: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.flush/10_basic.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.flush/10_basic.yml index 30a264ca64b..7c4e8536a20 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.flush/10_basic.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.flush/10_basic.yml @@ -56,8 +56,8 @@ --- "Flush parameters validation": - skip: - version: " - 7.0.99" - reason: flush parameters validation is introduced in 7.1.0 + version: " - 7.1.99" + reason: flush parameters validation is introduced in 7.2.0 - do: indices.create: index: test diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.open/10_basic.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.open/10_basic.yml index 0e08690868d..96a6110310e 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.open/10_basic.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.open/10_basic.yml @@ -65,8 +65,9 @@ --- "Close index with wait_for_active_shards set to all": - skip: - version: " - 7.0.99" - reason: "closed indices are replicated starting version 7.1.0" + version: " - , +" + reason: "closed indices are replicated starting version 7.2.0" - do: indices.create: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.recovery/10_basic.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.recovery/10_basic.yml index 08273ffcace..f227e076aa9 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.recovery/10_basic.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.recovery/10_basic.yml @@ -42,8 +42,8 @@ --- "Indices recovery test for closed index": - skip: - version: " - 7.0.99" - reason: closed indices are replicated starting version 7.1.0 + version: " - 7.1.99" + reason: closed indices are replicated starting version 7.2.0 - do: indices.create: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.stats/30_segments.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.stats/30_segments.yml index 9333006041a..e39e0198055 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.stats/30_segments.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.stats/30_segments.yml @@ -16,7 +16,7 @@ setup: "Segment Stats": - skip: - version: " - 7.0.99" + version: " - 7.1.99" reason: forbid_closed_indices is not supported in ealier version - do: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/230_composite.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/230_composite.yml index a2591c26257..535e5565008 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/230_composite.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/230_composite.yml @@ -445,8 +445,8 @@ setup: --- "Composite aggregation with unmapped field": - skip: - version: " - 7.0.99" - reason: starting in 7.1 the composite aggregation handles unmapped fields as keywords + version: " - 7.1.99" + reason: starting in 7.2 the composite aggregation handles unmapped fields as keywords - do: search: @@ -526,8 +526,8 @@ setup: --- "Missing source": - skip: - version: " - 7.0.99" - reason: null/empty sources disallowed in 7.1 + version: " - 7.1.99" + reason: null/empty sources disallowed in 7.2 - do: catch: /Composite \[sources\] cannot be null or empty/ @@ -555,8 +555,8 @@ setup: --- "Duplicate sources": - skip: - version: " - 7.0.99" - reason: duplicate names disallowed in 7.1 + version: " - 7.1.99" + reason: duplicate names disallowed in 7.2 - do: catch: /Composite source names must be unique, found duplicates[:] \[keyword\]/ diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/search/230_interval_query.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/search/230_interval_query.yml index 1d4f1883ef5..652e93e50aa 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/search/230_interval_query.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/search/230_interval_query.yml @@ -326,8 +326,8 @@ setup: --- "Test overlapping": - skip: - version: " - 7.9.99" - reason: "Implemented in 7.1" + version: " - 7.1.99" + reason: "Implemented in 7.2" - do: search: index: test @@ -349,8 +349,8 @@ setup: --- "Test before": - skip: - version: " - 7.9.99" - reason: "Implemented in 7.1" + version: " - 7.1.99" + reason: "Implemented in 7.2" - do: search: index: test @@ -369,8 +369,8 @@ setup: --- "Test after": - skip: - version: " - 7.9.99" - reason: "Implemented in 7.1" + version: " - 7.1.99" + reason: "Implemented in 7.2" - do: search: index: test diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/search/250_distance_feature.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/search/250_distance_feature.yml index a9ed68089eb..bafb7d52c71 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/search/250_distance_feature.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/search/250_distance_feature.yml @@ -1,7 +1,7 @@ setup: - skip: - version: " - 7.0.99" - reason: "Implemented in 7.1" + version: " - 7.1.99" + reason: "Implemented in 7.2" - do: indices.create: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/search/310_match_bool_prefix.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/search/310_match_bool_prefix.yml index 957d26036b4..aa6a5158b47 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/search/310_match_bool_prefix.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/search/310_match_bool_prefix.yml @@ -1,7 +1,7 @@ setup: - skip: - version: " - 7.1.0" - reason: "added in 7.1.0" + version: " - 7.1.99" + reason: "added in 7.2.0" - do: indices.create: diff --git a/server/src/main/java/org/elasticsearch/Version.java b/server/src/main/java/org/elasticsearch/Version.java index 09578c3b0f6..d6a01cd3247 100644 --- a/server/src/main/java/org/elasticsearch/Version.java +++ b/server/src/main/java/org/elasticsearch/Version.java @@ -134,8 +134,9 @@ public class Version implements Comparable, ToXContentFragment { public static final Version V_7_0_1 = new Version(V_7_0_1_ID, org.apache.lucene.util.Version.LUCENE_8_0_0); public static final int V_7_1_0_ID = 7010099; public static final Version V_7_1_0 = new Version(V_7_1_0_ID, org.apache.lucene.util.Version.LUCENE_8_0_0); - public static final Version CURRENT = V_7_1_0; - + public static final int V_7_2_0_ID = 7020099; + public static final Version V_7_2_0 = new Version(V_7_2_0_ID, org.apache.lucene.util.Version.LUCENE_8_0_0); + public static final Version CURRENT = V_7_2_0; static { assert CURRENT.luceneVersion.equals(org.apache.lucene.util.Version.LATEST) : "Version must be upgraded to [" @@ -148,6 +149,8 @@ public class Version implements Comparable, ToXContentFragment { public static Version fromId(int id) { switch (id) { + case V_7_2_0_ID: + return V_7_2_0; case V_7_1_0_ID: return V_7_1_0; case V_7_0_1_ID: diff --git a/server/src/main/java/org/elasticsearch/action/admin/cluster/health/ClusterHealthRequest.java b/server/src/main/java/org/elasticsearch/action/admin/cluster/health/ClusterHealthRequest.java index aa85a4f4da8..3f00243a306 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/cluster/health/ClusterHealthRequest.java +++ b/server/src/main/java/org/elasticsearch/action/admin/cluster/health/ClusterHealthRequest.java @@ -84,7 +84,7 @@ public class ClusterHealthRequest extends MasterNodeReadRequest im super.readFrom(in); indices = in.readStringArray(); indicesOptions = IndicesOptions.readIndicesOptions(in); - if (in.getVersion().onOrAfter(Version.V_7_1_0)) { + if (in.getVersion().onOrAfter(Version.V_7_2_0)) { waitForActiveShards = ActiveShardCount.readFrom(in); } else { waitForActiveShards = ActiveShardCount.NONE; @@ -130,7 +130,7 @@ public class CloseIndexRequest extends AcknowledgedRequest im super.writeTo(out); out.writeStringArray(indices); indicesOptions.writeIndicesOptions(out); - if (out.getVersion().onOrAfter(Version.V_7_1_0)) { + if (out.getVersion().onOrAfter(Version.V_7_2_0)) { waitForActiveShards.writeTo(out); } } diff --git a/server/src/main/java/org/elasticsearch/action/admin/indices/close/CloseIndexResponse.java b/server/src/main/java/org/elasticsearch/action/admin/indices/close/CloseIndexResponse.java index 9f930344794..ea44ba7a8e4 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/indices/close/CloseIndexResponse.java +++ b/server/src/main/java/org/elasticsearch/action/admin/indices/close/CloseIndexResponse.java @@ -37,7 +37,7 @@ public class CloseIndexResponse extends ShardsAcknowledgedResponse { @Override public void readFrom(StreamInput in) throws IOException { super.readFrom(in); - if (in.getVersion().onOrAfter(Version.V_7_1_0)) { + if (in.getVersion().onOrAfter(Version.V_7_2_0)) { readShardsAcknowledged(in); } } @@ -45,7 +45,7 @@ public class CloseIndexResponse extends ShardsAcknowledgedResponse { @Override public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); - if (out.getVersion().onOrAfter(Version.V_7_1_0)) { + if (out.getVersion().onOrAfter(Version.V_7_2_0)) { writeShardsAcknowledged(out); } } diff --git a/server/src/main/java/org/elasticsearch/action/admin/indices/stats/CommonStatsFlags.java b/server/src/main/java/org/elasticsearch/action/admin/indices/stats/CommonStatsFlags.java index e80a7cc8a17..2cbadd0806c 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/indices/stats/CommonStatsFlags.java +++ b/server/src/main/java/org/elasticsearch/action/admin/indices/stats/CommonStatsFlags.java @@ -64,7 +64,7 @@ public class CommonStatsFlags implements Writeable, Cloneable { fieldDataFields = in.readStringArray(); completionDataFields = in.readStringArray(); includeSegmentFileSizes = in.readBoolean(); - if (in.getVersion().onOrAfter(Version.V_7_1_0)) { + if (in.getVersion().onOrAfter(Version.V_7_2_0)) { includeUnloadedSegments = in.readBoolean(); } } @@ -82,7 +82,7 @@ public class CommonStatsFlags implements Writeable, Cloneable { out.writeStringArrayNullable(fieldDataFields); out.writeStringArrayNullable(completionDataFields); out.writeBoolean(includeSegmentFileSizes); - if (out.getVersion().onOrAfter(Version.V_7_1_0)) { + if (out.getVersion().onOrAfter(Version.V_7_2_0)) { out.writeBoolean(includeUnloadedSegments); } } diff --git a/server/src/main/java/org/elasticsearch/action/fieldcaps/FieldCapabilitiesRequest.java b/server/src/main/java/org/elasticsearch/action/fieldcaps/FieldCapabilitiesRequest.java index e34c55eb99f..75686cc6b0e 100644 --- a/server/src/main/java/org/elasticsearch/action/fieldcaps/FieldCapabilitiesRequest.java +++ b/server/src/main/java/org/elasticsearch/action/fieldcaps/FieldCapabilitiesRequest.java @@ -84,7 +84,7 @@ public final class FieldCapabilitiesRequest extends ActionRequest implements Ind indices = in.readStringArray(); indicesOptions = IndicesOptions.readIndicesOptions(in); mergeResults = in.readBoolean(); - if (in.getVersion().onOrAfter(Version.V_7_1_0)) { + if (in.getVersion().onOrAfter(Version.V_7_2_0)) { includeUnmapped = in.readBoolean(); } else { includeUnmapped = false; @@ -98,7 +98,7 @@ public final class FieldCapabilitiesRequest extends ActionRequest implements Ind out.writeStringArray(indices); indicesOptions.writeIndicesOptions(out); out.writeBoolean(mergeResults); - if (out.getVersion().onOrAfter(Version.V_7_1_0)) { + if (out.getVersion().onOrAfter(Version.V_7_2_0)) { out.writeBoolean(includeUnmapped); } } diff --git a/server/src/main/java/org/elasticsearch/action/fieldcaps/FieldCapabilitiesResponse.java b/server/src/main/java/org/elasticsearch/action/fieldcaps/FieldCapabilitiesResponse.java index 7999e1e70ad..e480d5dc69a 100644 --- a/server/src/main/java/org/elasticsearch/action/fieldcaps/FieldCapabilitiesResponse.java +++ b/server/src/main/java/org/elasticsearch/action/fieldcaps/FieldCapabilitiesResponse.java @@ -108,7 +108,7 @@ public class FieldCapabilitiesResponse extends ActionResponse implements ToXCont @Override public void readFrom(StreamInput in) throws IOException { super.readFrom(in); - if (in.getVersion().onOrAfter(Version.V_7_1_0)) { + if (in.getVersion().onOrAfter(Version.V_7_2_0)) { indices = in.readStringArray(); } else { indices = Strings.EMPTY_ARRAY; @@ -124,7 +124,7 @@ public class FieldCapabilitiesResponse extends ActionResponse implements ToXCont @Override public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); - if (out.getVersion().onOrAfter(Version.V_7_1_0)) { + if (out.getVersion().onOrAfter(Version.V_7_2_0)) { out.writeStringArray(indices); } out.writeMap(responseMap, StreamOutput::writeString, FieldCapabilitiesResponse::writeField); diff --git a/server/src/main/java/org/elasticsearch/cluster/metadata/IndexMetaData.java b/server/src/main/java/org/elasticsearch/cluster/metadata/IndexMetaData.java index 489203102f2..504ee1f2d77 100644 --- a/server/src/main/java/org/elasticsearch/cluster/metadata/IndexMetaData.java +++ b/server/src/main/java/org/elasticsearch/cluster/metadata/IndexMetaData.java @@ -719,7 +719,7 @@ public class IndexMetaData implements Diffable, ToXContentFragmen } else { settingsVersion = 1; } - if (in.getVersion().onOrAfter(Version.V_7_1_0)) { + if (in.getVersion().onOrAfter(Version.V_7_2_0)) { aliasesVersion = in.readVLong(); } else { aliasesVersion = 1; @@ -755,7 +755,7 @@ public class IndexMetaData implements Diffable, ToXContentFragmen if (out.getVersion().onOrAfter(Version.V_6_5_0)) { out.writeVLong(settingsVersion); } - if (out.getVersion().onOrAfter(Version.V_7_1_0)) { + if (out.getVersion().onOrAfter(Version.V_7_2_0)) { out.writeVLong(aliasesVersion); } out.writeByte(state.id); @@ -803,7 +803,7 @@ public class IndexMetaData implements Diffable, ToXContentFragmen } else { builder.settingsVersion(1); } - if (in.getVersion().onOrAfter(Version.V_7_1_0)) { + if (in.getVersion().onOrAfter(Version.V_7_2_0)) { builder.aliasesVersion(in.readVLong()); } else { builder.aliasesVersion(1); @@ -860,7 +860,7 @@ public class IndexMetaData implements Diffable, ToXContentFragmen if (out.getVersion().onOrAfter(Version.V_6_5_0)) { out.writeVLong(settingsVersion); } - if (out.getVersion().onOrAfter(Version.V_7_1_0)) { + if (out.getVersion().onOrAfter(Version.V_7_2_0)) { out.writeVLong(aliasesVersion); } out.writeInt(routingNumShards); @@ -1462,8 +1462,8 @@ public class IndexMetaData implements Diffable, ToXContentFragmen if (Assertions.ENABLED && Version.indexCreated(builder.settings).onOrAfter(Version.V_6_5_0)) { assert settingsVersion : "settings version should be present for indices created on or after 6.5.0"; } - if (Assertions.ENABLED && Version.indexCreated(builder.settings).onOrAfter(Version.V_7_1_0)) { - assert aliasesVersion : "aliases version should be present for indices created on or after 7.1.0"; + if (Assertions.ENABLED && Version.indexCreated(builder.settings).onOrAfter(Version.V_7_2_0)) { + assert aliasesVersion : "aliases version should be present for indices created on or after 7.2.0"; } return builder.build(); } diff --git a/server/src/main/java/org/elasticsearch/cluster/metadata/MetaDataIndexStateService.java b/server/src/main/java/org/elasticsearch/cluster/metadata/MetaDataIndexStateService.java index a004d0a5a23..80be71dadd3 100644 --- a/server/src/main/java/org/elasticsearch/cluster/metadata/MetaDataIndexStateService.java +++ b/server/src/main/java/org/elasticsearch/cluster/metadata/MetaDataIndexStateService.java @@ -402,7 +402,7 @@ public class MetaDataIndexStateService { // Remove the index routing table of closed indices if the cluster is in a mixed version // that does not support the replication of closed indices - final boolean removeRoutingTable = currentState.nodes().getMinNodeVersion().before(Version.V_7_1_0); + final boolean removeRoutingTable = currentState.nodes().getMinNodeVersion().before(Version.V_7_2_0); final MetaData.Builder metadata = MetaData.builder(currentState.metaData()); final ClusterBlocks.Builder blocks = ClusterBlocks.builder().blocks(currentState.blocks()); diff --git a/server/src/main/java/org/elasticsearch/index/engine/ReadOnlyEngine.java b/server/src/main/java/org/elasticsearch/index/engine/ReadOnlyEngine.java index 7b47d60437f..5cf62dbbf7c 100644 --- a/server/src/main/java/org/elasticsearch/index/engine/ReadOnlyEngine.java +++ b/server/src/main/java/org/elasticsearch/index/engine/ReadOnlyEngine.java @@ -130,7 +130,7 @@ public class ReadOnlyEngine extends Engine { // created after the refactoring of the Close Index API and its TransportVerifyShardBeforeCloseAction // that guarantee that all operations have been flushed to Lucene. final Version indexVersionCreated = engineConfig.getIndexSettings().getIndexVersionCreated(); - if (indexVersionCreated.onOrAfter(Version.V_7_1_0) || + if (indexVersionCreated.onOrAfter(Version.V_7_2_0) || (seqNoStats.getGlobalCheckpoint() != SequenceNumbers.UNASSIGNED_SEQ_NO && indexVersionCreated.onOrAfter(Version.V_6_7_0))) { if (seqNoStats.getMaxSeqNo() != seqNoStats.getGlobalCheckpoint()) { throw new IllegalStateException("Maximum sequence number [" + seqNoStats.getMaxSeqNo() diff --git a/server/src/main/java/org/elasticsearch/index/query/IntervalsSourceProvider.java b/server/src/main/java/org/elasticsearch/index/query/IntervalsSourceProvider.java index 6aa8f2d700e..e551654af9a 100644 --- a/server/src/main/java/org/elasticsearch/index/query/IntervalsSourceProvider.java +++ b/server/src/main/java/org/elasticsearch/index/query/IntervalsSourceProvider.java @@ -120,7 +120,7 @@ public abstract class IntervalsSourceProvider implements NamedWriteable, ToXCont this.ordered = in.readBoolean(); this.analyzer = in.readOptionalString(); this.filter = in.readOptionalWriteable(IntervalFilter::new); - if (in.getVersion().onOrAfter(Version.V_7_1_0)) { + if (in.getVersion().onOrAfter(Version.V_7_2_0)) { this.useField = in.readOptionalString(); } else { @@ -186,7 +186,7 @@ public abstract class IntervalsSourceProvider implements NamedWriteable, ToXCont out.writeBoolean(ordered); out.writeOptionalString(analyzer); out.writeOptionalWriteable(filter); - if (out.getVersion().onOrAfter(Version.V_7_1_0)) { + if (out.getVersion().onOrAfter(Version.V_7_2_0)) { out.writeOptionalString(useField); } } diff --git a/server/src/main/java/org/elasticsearch/index/refresh/RefreshStats.java b/server/src/main/java/org/elasticsearch/index/refresh/RefreshStats.java index c77e9033738..6488de5df0a 100644 --- a/server/src/main/java/org/elasticsearch/index/refresh/RefreshStats.java +++ b/server/src/main/java/org/elasticsearch/index/refresh/RefreshStats.java @@ -52,7 +52,7 @@ public class RefreshStats implements Streamable, Writeable, ToXContentFragment { public RefreshStats(StreamInput in) throws IOException { total = in.readVLong(); totalTimeInMillis = in.readVLong(); - if (in.getVersion().onOrAfter(Version.V_7_1_0)) { + if (in.getVersion().onOrAfter(Version.V_7_2_0)) { externalTotal = in.readVLong(); externalTotalTimeInMillis = in.readVLong(); } @@ -63,7 +63,7 @@ public class RefreshStats implements Streamable, Writeable, ToXContentFragment { public void writeTo(StreamOutput out) throws IOException { out.writeVLong(total); out.writeVLong(totalTimeInMillis); - if (out.getVersion().onOrAfter(Version.V_7_1_0)) { + if (out.getVersion().onOrAfter(Version.V_7_2_0)) { out.writeVLong(externalTotal); out.writeVLong(externalTotalTimeInMillis); } diff --git a/server/src/main/java/org/elasticsearch/indices/recovery/RecoveryCleanFilesRequest.java b/server/src/main/java/org/elasticsearch/indices/recovery/RecoveryCleanFilesRequest.java index d23f89a769c..8d847dcef91 100644 --- a/server/src/main/java/org/elasticsearch/indices/recovery/RecoveryCleanFilesRequest.java +++ b/server/src/main/java/org/elasticsearch/indices/recovery/RecoveryCleanFilesRequest.java @@ -52,7 +52,7 @@ public class RecoveryCleanFilesRequest extends TransportRequest { shardId = ShardId.readShardId(in); snapshotFiles = new Store.MetadataSnapshot(in); totalTranslogOps = in.readVInt(); - if (in.getVersion().onOrAfter(Version.V_7_1_0)) { + if (in.getVersion().onOrAfter(Version.V_7_2_0)) { globalCheckpoint = in.readZLong(); } else { globalCheckpoint = SequenceNumbers.UNASSIGNED_SEQ_NO; @@ -66,7 +66,7 @@ public class RecoveryCleanFilesRequest extends TransportRequest { shardId.writeTo(out); snapshotFiles.writeTo(out); out.writeVInt(totalTranslogOps); - if (out.getVersion().onOrAfter(Version.V_7_1_0)) { + if (out.getVersion().onOrAfter(Version.V_7_2_0)) { out.writeZLong(globalCheckpoint); } } diff --git a/server/src/main/java/org/elasticsearch/indices/recovery/RecoveryTarget.java b/server/src/main/java/org/elasticsearch/indices/recovery/RecoveryTarget.java index 467ee74dd5e..d0e548aa6b2 100644 --- a/server/src/main/java/org/elasticsearch/indices/recovery/RecoveryTarget.java +++ b/server/src/main/java/org/elasticsearch/indices/recovery/RecoveryTarget.java @@ -289,7 +289,7 @@ public class RecoveryTarget extends AbstractRefCounted implements RecoveryTarget state().getTranslog().totalOperations(totalTranslogOps); indexShard().openEngineAndSkipTranslogRecovery(); assert indexShard.getGlobalCheckpoint() >= indexShard.seqNoStats().getMaxSeqNo() || - indexShard.indexSettings().getIndexVersionCreated().before(Version.V_7_1_0) + indexShard.indexSettings().getIndexVersionCreated().before(Version.V_7_2_0) : "global checkpoint is not initialized [" + indexShard.seqNoStats() + "]"; return null; }); @@ -400,7 +400,7 @@ public class RecoveryTarget extends AbstractRefCounted implements RecoveryTarget store.ensureIndexHasHistoryUUID(); } assert globalCheckpoint >= Long.parseLong(sourceMetaData.getCommitUserData().get(SequenceNumbers.MAX_SEQ_NO)) - || indexShard.indexSettings().getIndexVersionCreated().before(Version.V_7_1_0) : + || indexShard.indexSettings().getIndexVersionCreated().before(Version.V_7_2_0) : "invalid global checkpoint[" + globalCheckpoint + "] source_meta_data [" + sourceMetaData.getCommitUserData() + "]"; final String translogUUID = Translog.createEmptyTranslog( indexShard.shardPath().resolveTranslog(), globalCheckpoint, shardId, indexShard.getPendingPrimaryTerm()); diff --git a/server/src/main/java/org/elasticsearch/indices/recovery/RecoveryTranslogOperationsRequest.java b/server/src/main/java/org/elasticsearch/indices/recovery/RecoveryTranslogOperationsRequest.java index ae35828fca0..7238fd2b172 100644 --- a/server/src/main/java/org/elasticsearch/indices/recovery/RecoveryTranslogOperationsRequest.java +++ b/server/src/main/java/org/elasticsearch/indices/recovery/RecoveryTranslogOperationsRequest.java @@ -121,7 +121,7 @@ public class RecoveryTranslogOperationsRequest extends TransportRequest { } else { retentionLeases = RetentionLeases.EMPTY; } - if (in.getVersion().onOrAfter(Version.V_7_1_0)) { + if (in.getVersion().onOrAfter(Version.V_7_2_0)) { mappingVersionOnPrimary = in.readVLong(); } else { mappingVersionOnPrimary = Long.MAX_VALUE; @@ -144,7 +144,7 @@ public class RecoveryTranslogOperationsRequest extends TransportRequest { if (out.getVersion().onOrAfter(Version.V_6_7_0)) { retentionLeases.writeTo(out); } - if (out.getVersion().onOrAfter(Version.V_7_1_0)) { + if (out.getVersion().onOrAfter(Version.V_7_2_0)) { out.writeVLong(mappingVersionOnPrimary); } } diff --git a/server/src/main/java/org/elasticsearch/search/aggregations/metrics/InternalGeoCentroid.java b/server/src/main/java/org/elasticsearch/search/aggregations/metrics/InternalGeoCentroid.java index b1ca571e713..63dd8b50f71 100644 --- a/server/src/main/java/org/elasticsearch/search/aggregations/metrics/InternalGeoCentroid.java +++ b/server/src/main/java/org/elasticsearch/search/aggregations/metrics/InternalGeoCentroid.java @@ -70,7 +70,7 @@ public class InternalGeoCentroid extends InternalAggregation implements GeoCentr super(in); count = in.readVLong(); if (in.readBoolean()) { - if (in.getVersion().onOrAfter(Version.V_7_1_0)) { + if (in.getVersion().onOrAfter(Version.V_7_2_0)) { centroid = new GeoPoint(in.readDouble(), in.readDouble()); } else { final long hash = in.readLong(); @@ -87,7 +87,7 @@ public class InternalGeoCentroid extends InternalAggregation implements GeoCentr out.writeVLong(count); if (centroid != null) { out.writeBoolean(true); - if (out.getVersion().onOrAfter(Version.V_7_1_0)) { + if (out.getVersion().onOrAfter(Version.V_7_2_0)) { out.writeDouble(centroid.lat()); out.writeDouble(centroid.lon()); } else { diff --git a/server/src/main/java/org/elasticsearch/search/query/QuerySearchResult.java b/server/src/main/java/org/elasticsearch/search/query/QuerySearchResult.java index db8b67ca109..c3c4859d5ae 100644 --- a/server/src/main/java/org/elasticsearch/search/query/QuerySearchResult.java +++ b/server/src/main/java/org/elasticsearch/search/query/QuerySearchResult.java @@ -286,7 +286,7 @@ public final class QuerySearchResult extends SearchPhaseResult { if (hasAggs = in.readBoolean()) { aggregations = InternalAggregations.readAggregations(in); } - if (in.getVersion().before(Version.V_7_1_0)) { + if (in.getVersion().before(Version.V_7_2_0)) { List pipelineAggregators = in.readNamedWriteableList(PipelineAggregator.class).stream() .map(a -> (SiblingPipelineAggregator) a).collect(Collectors.toList()); if (hasAggs && pipelineAggregators.isEmpty() == false) { @@ -339,7 +339,7 @@ public final class QuerySearchResult extends SearchPhaseResult { out.writeBoolean(true); aggregations.writeTo(out); } - if (out.getVersion().before(Version.V_7_1_0)) { + if (out.getVersion().before(Version.V_7_2_0)) { //Earlier versions expect sibling pipeline aggs separately as they used to be set to QuerySearchResult directly, //while later versions expect them in InternalAggregations. Note that despite serializing sibling pipeline aggs as part of //InternalAggregations is supported since 6.7.0, the shards set sibling pipeline aggs to InternalAggregations only from 7.1 on. diff --git a/server/src/main/java/org/elasticsearch/search/sort/FieldSortBuilder.java b/server/src/main/java/org/elasticsearch/search/sort/FieldSortBuilder.java index e0d816c1d92..9e76e5cc1b6 100644 --- a/server/src/main/java/org/elasticsearch/search/sort/FieldSortBuilder.java +++ b/server/src/main/java/org/elasticsearch/search/sort/FieldSortBuilder.java @@ -130,7 +130,7 @@ public class FieldSortBuilder extends SortBuilder { if (in.getVersion().onOrAfter(Version.V_6_1_0)) { nestedSort = in.readOptionalWriteable(NestedSortBuilder::new); } - if (in.getVersion().onOrAfter(Version.V_7_1_0)) { + if (in.getVersion().onOrAfter(Version.V_7_2_0)) { numericType = in.readOptionalString(); } } @@ -147,7 +147,7 @@ public class FieldSortBuilder extends SortBuilder { if (out.getVersion().onOrAfter(Version.V_6_1_0)) { out.writeOptionalWriteable(nestedSort); } - if (out.getVersion().onOrAfter(Version.V_7_1_0)) { + if (out.getVersion().onOrAfter(Version.V_7_2_0)) { out.writeOptionalString(numericType); } } diff --git a/server/src/test/java/org/elasticsearch/action/admin/cluster/health/ClusterHealthRequestTests.java b/server/src/test/java/org/elasticsearch/action/admin/cluster/health/ClusterHealthRequestTests.java index d91f162c1bc..e532d245ec8 100644 --- a/server/src/test/java/org/elasticsearch/action/admin/cluster/health/ClusterHealthRequestTests.java +++ b/server/src/test/java/org/elasticsearch/action/admin/cluster/health/ClusterHealthRequestTests.java @@ -57,9 +57,9 @@ public class ClusterHealthRequestTests extends ESTestCase { public void testBwcSerialization() throws Exception { for (int runs = 0; runs < randomIntBetween(5, 20); runs++) { - // Generate a random cluster health request in version < 7.1.0 and serializes it + // Generate a random cluster health request in version < 7.2.0 and serializes it final BytesStreamOutput out = new BytesStreamOutput(); - out.setVersion(randomVersionBetween(random(), Version.V_6_3_0, getPreviousVersion(Version.V_7_1_0))); + out.setVersion(randomVersionBetween(random(), Version.V_6_3_0, getPreviousVersion(Version.V_7_2_0))); final ClusterHealthRequest expected = randomRequest(); { @@ -112,9 +112,9 @@ public class ClusterHealthRequestTests extends ESTestCase { // Generate a random cluster health request in current version final ClusterHealthRequest expected = randomRequest(); - // Serialize to node in version < 7.1.0 + // Serialize to node in version < 7.2.0 final BytesStreamOutput out = new BytesStreamOutput(); - out.setVersion(randomVersionBetween(random(), Version.V_6_3_0, getPreviousVersion(Version.V_7_1_0))); + out.setVersion(randomVersionBetween(random(), Version.V_6_3_0, getPreviousVersion(Version.V_7_2_0))); expected.writeTo(out); // Deserialize and check the cluster health request diff --git a/server/src/test/java/org/elasticsearch/action/admin/indices/close/CloseIndexRequestTests.java b/server/src/test/java/org/elasticsearch/action/admin/indices/close/CloseIndexRequestTests.java index 91183d852af..985b4304a32 100644 --- a/server/src/test/java/org/elasticsearch/action/admin/indices/close/CloseIndexRequestTests.java +++ b/server/src/test/java/org/elasticsearch/action/admin/indices/close/CloseIndexRequestTests.java @@ -54,7 +54,7 @@ public class CloseIndexRequestTests extends ESTestCase { { final CloseIndexRequest request = randomRequest(); try (BytesStreamOutput out = new BytesStreamOutput()) { - out.setVersion(randomVersionBetween(random(), Version.V_6_4_0, VersionUtils.getPreviousVersion(Version.V_7_1_0))); + out.setVersion(randomVersionBetween(random(), Version.V_6_4_0, VersionUtils.getPreviousVersion(Version.V_7_2_0))); request.writeTo(out); try (StreamInput in = out.bytes().streamInput()) { @@ -77,7 +77,7 @@ public class CloseIndexRequestTests extends ESTestCase { final CloseIndexRequest deserializedRequest = new CloseIndexRequest(); try (StreamInput in = out.bytes().streamInput()) { - in.setVersion(randomVersionBetween(random(), Version.V_6_4_0, VersionUtils.getPreviousVersion(Version.V_7_1_0))); + in.setVersion(randomVersionBetween(random(), Version.V_6_4_0, VersionUtils.getPreviousVersion(Version.V_7_2_0))); deserializedRequest.readFrom(in); } assertEquals(sample.getParentTask(), deserializedRequest.getParentTask()); diff --git a/server/src/test/java/org/elasticsearch/action/admin/indices/close/CloseIndexResponseTests.java b/server/src/test/java/org/elasticsearch/action/admin/indices/close/CloseIndexResponseTests.java index 6e855e49262..cca95e09151 100644 --- a/server/src/test/java/org/elasticsearch/action/admin/indices/close/CloseIndexResponseTests.java +++ b/server/src/test/java/org/elasticsearch/action/admin/indices/close/CloseIndexResponseTests.java @@ -48,7 +48,7 @@ public class CloseIndexResponseTests extends ESTestCase { { final CloseIndexResponse response = randomResponse(); try (BytesStreamOutput out = new BytesStreamOutput()) { - out.setVersion(randomVersionBetween(random(), Version.V_6_0_0, VersionUtils.getPreviousVersion(Version.V_7_1_0))); + out.setVersion(randomVersionBetween(random(), Version.V_6_0_0, VersionUtils.getPreviousVersion(Version.V_7_2_0))); response.writeTo(out); final AcknowledgedResponse deserializedResponse = new AcknowledgedResponse(); @@ -65,7 +65,7 @@ public class CloseIndexResponseTests extends ESTestCase { final CloseIndexResponse deserializedResponse = new CloseIndexResponse(); try (StreamInput in = out.bytes().streamInput()) { - in.setVersion(randomVersionBetween(random(), Version.V_6_0_0, VersionUtils.getPreviousVersion(Version.V_7_1_0))); + in.setVersion(randomVersionBetween(random(), Version.V_6_0_0, VersionUtils.getPreviousVersion(Version.V_7_2_0))); deserializedResponse.readFrom(in); } assertThat(deserializedResponse.isAcknowledged(), equalTo(response.isAcknowledged())); diff --git a/server/src/test/java/org/elasticsearch/cluster/metadata/MetaDataIndexStateServiceTests.java b/server/src/test/java/org/elasticsearch/cluster/metadata/MetaDataIndexStateServiceTests.java index 8189e0b2b04..ee50eef23c9 100644 --- a/server/src/test/java/org/elasticsearch/cluster/metadata/MetaDataIndexStateServiceTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/metadata/MetaDataIndexStateServiceTests.java @@ -140,7 +140,7 @@ public class MetaDataIndexStateServiceTests extends ESTestCase { .add(new DiscoveryNode("old_node", buildNewFakeTransportAddress(), emptyMap(), new HashSet<>(Arrays.asList(DiscoveryNode.Role.values())), Version.V_7_0_0)) .add(new DiscoveryNode("new_node", buildNewFakeTransportAddress(), emptyMap(), - new HashSet<>(Arrays.asList(DiscoveryNode.Role.values())), Version.V_7_1_0))) + new HashSet<>(Arrays.asList(DiscoveryNode.Role.values())), Version.V_7_2_0))) .build(); state = MetaDataIndexStateService.closeRoutingTable(state, blockedIndices, results); diff --git a/server/src/test/java/org/elasticsearch/indices/IndicesLifecycleListenerIT.java b/server/src/test/java/org/elasticsearch/indices/IndicesLifecycleListenerIT.java index 40eb2000bea..cb0206144e8 100644 --- a/server/src/test/java/org/elasticsearch/indices/IndicesLifecycleListenerIT.java +++ b/server/src/test/java/org/elasticsearch/indices/IndicesLifecycleListenerIT.java @@ -212,7 +212,7 @@ public class IndicesLifecycleListenerIT extends ESIntegTestCase { assertThat(stateChangeListenerNode1.afterCloseSettings.getAsInt(SETTING_NUMBER_OF_SHARDS, -1), equalTo(6)); assertThat(stateChangeListenerNode1.afterCloseSettings.getAsInt(SETTING_NUMBER_OF_REPLICAS, -1), equalTo(1)); - if (Version.CURRENT.onOrAfter(Version.V_7_1_0)) { + if (Version.CURRENT.onOrAfter(Version.V_7_2_0)) { assertShardStatesMatch(stateChangeListenerNode1, 6, CLOSED, CREATED, RECOVERING, POST_RECOVERY, STARTED); assertShardStatesMatch(stateChangeListenerNode2, 6, CLOSED, CREATED, RECOVERING, POST_RECOVERY, STARTED); } else { diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/dataframe/transforms/DataFrameTransform.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/dataframe/transforms/DataFrameTransform.java index 25b2305d8ad..0e4780f5ad0 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/dataframe/transforms/DataFrameTransform.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/dataframe/transforms/DataFrameTransform.java @@ -47,7 +47,7 @@ public class DataFrameTransform extends AbstractDiffable imp @Override public Version getMinimalSupportedVersion() { - return Version.V_7_1_0; + return Version.V_7_2_0; } @Override diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/SecurityFeatureSetUsage.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/SecurityFeatureSetUsage.java index 618414426f0..a3fc9570b02 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/SecurityFeatureSetUsage.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/SecurityFeatureSetUsage.java @@ -43,7 +43,7 @@ public class SecurityFeatureSetUsage extends XPackFeatureSet.Usage { realmsUsage = in.readMap(); rolesStoreUsage = in.readMap(); sslUsage = in.readMap(); - if (in.getVersion().onOrAfter(Version.V_7_1_0)) { + if (in.getVersion().onOrAfter(Version.V_7_2_0)) { tokenServiceUsage = in.readMap(); apiKeyServiceUsage = in.readMap(); } @@ -80,7 +80,7 @@ public class SecurityFeatureSetUsage extends XPackFeatureSet.Usage { out.writeMap(realmsUsage); out.writeMap(rolesStoreUsage); out.writeMap(sslUsage); - if (out.getVersion().onOrAfter(Version.V_7_1_0)) { + if (out.getVersion().onOrAfter(Version.V_7_2_0)) { out.writeMap(tokenServiceUsage); out.writeMap(apiKeyServiceUsage); } diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/rolemapping/PutRoleMappingRequest.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/rolemapping/PutRoleMappingRequest.java index ae036b63162..43d005c5227 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/rolemapping/PutRoleMappingRequest.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/rolemapping/PutRoleMappingRequest.java @@ -137,7 +137,7 @@ public class PutRoleMappingRequest extends ActionRequest this.name = in.readString(); this.enabled = in.readBoolean(); this.roles = in.readStringList(); - if (in.getVersion().onOrAfter(Version.V_7_1_0)) { + if (in.getVersion().onOrAfter(Version.V_7_2_0)) { this.roleTemplates = in.readList(TemplateRoleName::new); } this.rules = ExpressionParser.readExpression(in); @@ -151,7 +151,7 @@ public class PutRoleMappingRequest extends ActionRequest out.writeString(name); out.writeBoolean(enabled); out.writeStringCollection(roles); - if (out.getVersion().onOrAfter(Version.V_7_1_0)) { + if (out.getVersion().onOrAfter(Version.V_7_2_0)) { out.writeList(roleTemplates); } ExpressionParser.writeExpression(rules, out); diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/support/TokensInvalidationResult.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/support/TokensInvalidationResult.java index f9985dfba7a..3f2e9f5882b 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/support/TokensInvalidationResult.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/support/TokensInvalidationResult.java @@ -51,7 +51,7 @@ public class TokensInvalidationResult implements ToXContentObject, Writeable { this.invalidatedTokens = in.readStringList(); this.previouslyInvalidatedTokens = in.readStringList(); this.errors = in.readList(StreamInput::readException); - if (in.getVersion().before(Version.V_7_1_0)) { + if (in.getVersion().before(Version.V_7_2_0)) { in.readVInt(); } } @@ -97,7 +97,7 @@ public class TokensInvalidationResult implements ToXContentObject, Writeable { out.writeStringCollection(invalidatedTokens); out.writeStringCollection(previouslyInvalidatedTokens); out.writeCollection(errors, StreamOutput::writeException); - if (out.getVersion().before(Version.V_7_1_0)) { + if (out.getVersion().before(Version.V_7_2_0)) { out.writeVInt(5); } } diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/support/mapper/ExpressionRoleMapping.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/support/mapper/ExpressionRoleMapping.java index 1564b46760c..03c93ecab60 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/support/mapper/ExpressionRoleMapping.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/support/mapper/ExpressionRoleMapping.java @@ -91,7 +91,7 @@ public class ExpressionRoleMapping implements ToXContentObject, Writeable { this.name = in.readString(); this.enabled = in.readBoolean(); this.roles = in.readStringList(); - if (in.getVersion().onOrAfter(Version.V_7_1_0)) { + if (in.getVersion().onOrAfter(Version.V_7_2_0)) { this.roleTemplates = in.readList(TemplateRoleName::new); } else { this.roleTemplates = Collections.emptyList(); @@ -105,7 +105,7 @@ public class ExpressionRoleMapping implements ToXContentObject, Writeable { out.writeString(name); out.writeBoolean(enabled); out.writeStringCollection(roles); - if (out.getVersion().onOrAfter(Version.V_7_1_0)) { + if (out.getVersion().onOrAfter(Version.V_7_2_0)) { out.writeList(roleTemplates); } ExpressionParser.writeExpression(expression, out); diff --git a/x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportOpenJobAction.java b/x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportOpenJobAction.java index 162ed336574..d2aea878b0f 100644 --- a/x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportOpenJobAction.java +++ b/x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportOpenJobAction.java @@ -139,7 +139,7 @@ public class TransportOpenJobAction extends TransportMasterNodeAction