[ML] More corrections to BWC version for model min version in job serialization

Original commit: elastic/x-pack-elasticsearch@408f35f784
This commit is contained in:
David Roberts 2018-03-27 16:19:39 +01:00
parent e34cb2085f
commit f1a948bc54
1 changed files with 3 additions and 3 deletions

View File

@ -522,7 +522,7 @@ public class Job extends AbstractDiffable<Job> implements Writeable, ToXContentO
out.writeOptionalLong(resultsRetentionDays);
out.writeMap(customSettings);
out.writeOptionalString(modelSnapshotId);
if (out.getVersion().onOrAfter(Version.V_6_3_0)) {
if (out.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) {
if (modelSnapshotMinVersion != null) {
out.writeBoolean(true);
Version.writeVersion(modelSnapshotMinVersion, out);
@ -758,7 +758,7 @@ public class Job extends AbstractDiffable<Job> implements Writeable, ToXContentO
resultsRetentionDays = in.readOptionalLong();
customSettings = in.readMap();
modelSnapshotId = in.readOptionalString();
if (in.getVersion().onOrAfter(Version.V_6_3_0) && in.readBoolean()) {
if (in.getVersion().onOrAfter(Version.V_7_0_0_alpha1) && in.readBoolean()) {
modelSnapshotMinVersion = Version.readVersion(in);
} else {
modelSnapshotMinVersion = null;
@ -965,7 +965,7 @@ public class Job extends AbstractDiffable<Job> implements Writeable, ToXContentO
out.writeOptionalLong(resultsRetentionDays);
out.writeMap(customSettings);
out.writeOptionalString(modelSnapshotId);
if (out.getVersion().onOrAfter(Version.V_6_3_0)) {
if (out.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) {
if (modelSnapshotMinVersion != null) {
out.writeBoolean(true);
Version.writeVersion(modelSnapshotMinVersion, out);