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:
parent
b6f16a6b0d
commit
762bacbc03
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue