Update start_trial version compatibility (elastic/x-pack-elasticsearch#4122)

This is related to elastic/x-pack-elasticsearch#3877. With the backport of elastic/x-pack-elasticsearch#4102 the type
parameter for start_trial is now on 6.3. This commit updates the
version check during stream serialization / deserialization.

Original commit: elastic/x-pack-elasticsearch@75e8537ab6
This commit is contained in:
Tim Brooks 2018-03-19 12:08:13 -04:00 committed by GitHub
parent b6f16a6b0d
commit 762bacbc03
1 changed files with 2 additions and 4 deletions

View File

@ -34,8 +34,7 @@ public class PostStartTrialRequest extends MasterNodeRequest<PostStartTrialReque
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
// TODO: Change to 6.3 after backport
if (in.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) {
if (in.getVersion().onOrAfter(Version.V_6_3_0)) {
type = in.readString();
} else {
type = "trial";
@ -45,8 +44,7 @@ public class PostStartTrialRequest extends MasterNodeRequest<PostStartTrialReque
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);
// TODO: Change to 6.3 after backport
Version version = Version.V_7_0_0_alpha1;
Version version = Version.V_6_3_0;
if (out.getVersion().onOrAfter(version)) {
out.writeString(type);
} else {