From b3300f518b2c50ce5488aa49326524dc3327b239 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francisco=20Fern=C3=A1ndez=20Casta=C3=B1o?= Date: Fri, 4 Jun 2021 17:05:38 +0200 Subject: [PATCH] Fix AutoFollow bwc checks --- .../org/elasticsearch/xpack/core/ccr/AutoFollowMetadata.java | 4 ++-- .../xpack/core/ccr/action/PutAutoFollowPatternAction.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ccr/AutoFollowMetadata.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ccr/AutoFollowMetadata.java index b7ace5f6afc7f..681bb2ff26c11 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ccr/AutoFollowMetadata.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ccr/AutoFollowMetadata.java @@ -284,7 +284,7 @@ private AutoFollowPattern(String remoteCluster, } else { this.active = true; } - if (in.getVersion().onOrAfter(Version.V_8_0_0)) { + if (in.getVersion().onOrAfter(Version.V_7_14_0)) { this.leaderIndexExclusionPatterns = in.readStringList(); } else { this.leaderIndexExclusionPatterns = Collections.emptyList(); @@ -345,7 +345,7 @@ public void writeTo(StreamOutput out) throws IOException { if (out.getVersion().onOrAfter(Version.V_7_5_0)) { out.writeBoolean(active); } - if (out.getVersion().onOrAfter(Version.V_8_0_0)) { + if (out.getVersion().onOrAfter(Version.V_7_14_0)) { out.writeStringCollection(leaderIndexExclusionPatterns); } } diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ccr/action/PutAutoFollowPatternAction.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ccr/action/PutAutoFollowPatternAction.java index e5b154d72552a..94e8096351604 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ccr/action/PutAutoFollowPatternAction.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ccr/action/PutAutoFollowPatternAction.java @@ -182,7 +182,7 @@ public Request(StreamInput in) throws IOException { settings = Settings.readSettingsFromStream(in); } parameters = new FollowParameters(in); - if (in.getVersion().onOrAfter(Version.V_8_0_0)) { + if (in.getVersion().onOrAfter(Version.V_7_14_0)) { leaderIndexExclusionPatterns = in.readStringList(); } } @@ -198,7 +198,7 @@ public void writeTo(StreamOutput out) throws IOException { Settings.writeSettingsToStream(settings, out); } parameters.writeTo(out); - if (out.getVersion().onOrAfter(Version.V_8_0_0)) { + if (out.getVersion().onOrAfter(Version.V_7_14_0)) { out.writeStringCollection(leaderIndexExclusionPatterns); } }