[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.writeOptionalLong(resultsRetentionDays);
|
||||||
out.writeMap(customSettings);
|
out.writeMap(customSettings);
|
||||||
out.writeOptionalString(modelSnapshotId);
|
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) {
|
if (modelSnapshotMinVersion != null) {
|
||||||
out.writeBoolean(true);
|
out.writeBoolean(true);
|
||||||
Version.writeVersion(modelSnapshotMinVersion, out);
|
Version.writeVersion(modelSnapshotMinVersion, out);
|
||||||
|
@ -758,7 +758,7 @@ public class Job extends AbstractDiffable<Job> implements Writeable, ToXContentO
|
||||||
resultsRetentionDays = in.readOptionalLong();
|
resultsRetentionDays = in.readOptionalLong();
|
||||||
customSettings = in.readMap();
|
customSettings = in.readMap();
|
||||||
modelSnapshotId = in.readOptionalString();
|
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);
|
modelSnapshotMinVersion = Version.readVersion(in);
|
||||||
} else {
|
} else {
|
||||||
modelSnapshotMinVersion = null;
|
modelSnapshotMinVersion = null;
|
||||||
|
@ -965,7 +965,7 @@ public class Job extends AbstractDiffable<Job> implements Writeable, ToXContentO
|
||||||
out.writeOptionalLong(resultsRetentionDays);
|
out.writeOptionalLong(resultsRetentionDays);
|
||||||
out.writeMap(customSettings);
|
out.writeMap(customSettings);
|
||||||
out.writeOptionalString(modelSnapshotId);
|
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) {
|
if (modelSnapshotMinVersion != null) {
|
||||||
out.writeBoolean(true);
|
out.writeBoolean(true);
|
||||||
Version.writeVersion(modelSnapshotMinVersion, out);
|
Version.writeVersion(modelSnapshotMinVersion, out);
|
||||||
|
|
Loading…
Reference in New Issue