Skip to content

Commit

Permalink
Fix AutoFollow version checks (#73776)
Browse files Browse the repository at this point in the history
Relates #72935
  • Loading branch information
fcofdez authored Jun 4, 2021
1 parent 094f193 commit 0628213
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
Expand All @@ -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);
}
}
Expand Down

0 comments on commit 0628213

Please sign in to comment.