From 752ba2fb4569587e4d1e5355b95ce628027d8799 Mon Sep 17 00:00:00 2001 From: Jim Ferenczi Date: Thu, 26 Apr 2018 14:06:56 +0200 Subject: [PATCH] Adjust serialization versions after backport Relates #29533 --- .../search/internal/ShardSearchLocalRequest.java | 4 ++-- .../java/org/elasticsearch/search/slice/SliceBuilder.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/server/src/main/java/org/elasticsearch/search/internal/ShardSearchLocalRequest.java b/server/src/main/java/org/elasticsearch/search/internal/ShardSearchLocalRequest.java index 52892d4d52e..cf656ed3b9c 100644 --- a/server/src/main/java/org/elasticsearch/search/internal/ShardSearchLocalRequest.java +++ b/server/src/main/java/org/elasticsearch/search/internal/ShardSearchLocalRequest.java @@ -235,7 +235,7 @@ public class ShardSearchLocalRequest implements ShardSearchRequest { if (in.getVersion().onOrAfter(Version.V_6_3_0)) { allowPartialSearchResults = in.readOptionalBoolean(); } - if (in.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) { + if (in.getVersion().onOrAfter(Version.V_6_4_0)) { indexRoutings = in.readStringArray(); preference = in.readOptionalString(); } else { @@ -268,7 +268,7 @@ public class ShardSearchLocalRequest implements ShardSearchRequest { out.writeOptionalBoolean(allowPartialSearchResults); } if (asKey == false) { - if (out.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) { + if (out.getVersion().onOrAfter(Version.V_6_4_0)) { out.writeStringArray(indexRoutings); out.writeOptionalString(preference); } diff --git a/server/src/main/java/org/elasticsearch/search/slice/SliceBuilder.java b/server/src/main/java/org/elasticsearch/search/slice/SliceBuilder.java index 06eba08fd7f..7e6945b9d48 100644 --- a/server/src/main/java/org/elasticsearch/search/slice/SliceBuilder.java +++ b/server/src/main/java/org/elasticsearch/search/slice/SliceBuilder.java @@ -225,7 +225,7 @@ public class SliceBuilder implements Writeable, ToXContentObject { int shardId = request.shardId().id(); int numShards = context.getIndexSettings().getNumberOfShards(); - if (minNodeVersion.onOrAfter(Version.V_7_0_0_alpha1) && + if (minNodeVersion.onOrAfter(Version.V_6_4_0) && (request.preference() != null || request.indexRoutings().length > 0)) { GroupShardsIterator group = buildShardIterator(clusterService, request); assert group.size() <= numShards : "index routing shards: " + group.size() + @@ -235,7 +235,7 @@ public class SliceBuilder implements Writeable, ToXContentObject { * The routing of this request targets a subset of the shards of this index so we need to we retrieve * the original {@link GroupShardsIterator} and compute the request shard id and number of * shards from it. - * This behavior has been added in {@link Version#V_7_0_0_alpha1} so if there is another node in the cluster + * This behavior has been added in {@link Version#V_6_4_0} so if there is another node in the cluster * with an older version we use the original shard id and number of shards in order to ensure that all * slices use the same numbers. */