Skip to content

Commit

Permalink
Update ForceMergeAction's BWC constants
Browse files Browse the repository at this point in the history
Once elastic#51819 is merged the `codec` parameter will be available in the 7.x branch. This updates the
version constants so master (8.0) and 7.7 can talk to each other.
  • Loading branch information
dakrone committed Feb 4, 2020
1 parent 12b24bf commit 7da0965
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public ForceMergeAction(int maxNumSegments, @Nullable String codec) {

public ForceMergeAction(StreamInput in) throws IOException {
this.maxNumSegments = in.readVInt();
if (in.getVersion().onOrAfter(Version.V_8_0_0)) {
if (in.getVersion().onOrAfter(Version.V_7_7_0)) {
this.codec = in.readOptionalString();
} else {
this.codec = null;
Expand All @@ -86,7 +86,7 @@ public String getCodec() {
@Override
public void writeTo(StreamOutput out) throws IOException {
out.writeVInt(maxNumSegments);
if (out.getVersion().onOrAfter(Version.V_8_0_0)) {
if (out.getVersion().onOrAfter(Version.V_7_7_0)) {
out.writeOptionalString(codec);
}
}
Expand Down

0 comments on commit 7da0965

Please sign in to comment.