Skip to content

Commit 0628213

Browse files
authored
Fix AutoFollow version checks (#73776)
Relates #72935
1 parent 094f193 commit 0628213

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ccr/AutoFollowMetadata.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ private AutoFollowPattern(String remoteCluster,
284284
} else {
285285
this.active = true;
286286
}
287-
if (in.getVersion().onOrAfter(Version.V_8_0_0)) {
287+
if (in.getVersion().onOrAfter(Version.V_7_14_0)) {
288288
this.leaderIndexExclusionPatterns = in.readStringList();
289289
} else {
290290
this.leaderIndexExclusionPatterns = Collections.emptyList();
@@ -345,7 +345,7 @@ public void writeTo(StreamOutput out) throws IOException {
345345
if (out.getVersion().onOrAfter(Version.V_7_5_0)) {
346346
out.writeBoolean(active);
347347
}
348-
if (out.getVersion().onOrAfter(Version.V_8_0_0)) {
348+
if (out.getVersion().onOrAfter(Version.V_7_14_0)) {
349349
out.writeStringCollection(leaderIndexExclusionPatterns);
350350
}
351351
}

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ccr/action/PutAutoFollowPatternAction.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ public Request(StreamInput in) throws IOException {
182182
settings = Settings.readSettingsFromStream(in);
183183
}
184184
parameters = new FollowParameters(in);
185-
if (in.getVersion().onOrAfter(Version.V_8_0_0)) {
185+
if (in.getVersion().onOrAfter(Version.V_7_14_0)) {
186186
leaderIndexExclusionPatterns = in.readStringList();
187187
}
188188
}
@@ -198,7 +198,7 @@ public void writeTo(StreamOutput out) throws IOException {
198198
Settings.writeSettingsToStream(settings, out);
199199
}
200200
parameters.writeTo(out);
201-
if (out.getVersion().onOrAfter(Version.V_8_0_0)) {
201+
if (out.getVersion().onOrAfter(Version.V_7_14_0)) {
202202
out.writeStringCollection(leaderIndexExclusionPatterns);
203203
}
204204
}

0 commit comments

Comments
 (0)