[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:
parent
e34cb2085f
commit
f1a948bc54
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue