mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-17 10:25:15 +00:00
[ML] Model snapshot min_version is now present since 7.0.0
Original commit: elastic/x-pack-elasticsearch@39d193461d
This commit is contained in:
parent
a600350d4c
commit
afb6a06f61
@ -133,7 +133,7 @@ public class ModelSnapshot implements ToXContentObject, Writeable {
|
||||
|
||||
public ModelSnapshot(StreamInput in) throws IOException {
|
||||
jobId = in.readString();
|
||||
if (in.getVersion().onOrAfter(Version.V_6_3_0)) {
|
||||
if (in.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) {
|
||||
minVersion = Version.readVersion(in);
|
||||
} else {
|
||||
minVersion = Version.V_5_5_0;
|
||||
@ -152,7 +152,7 @@ public class ModelSnapshot implements ToXContentObject, Writeable {
|
||||
@Override
|
||||
public void writeTo(StreamOutput out) throws IOException {
|
||||
out.writeString(jobId);
|
||||
if (out.getVersion().onOrAfter(Version.V_6_3_0)) {
|
||||
if (out.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) {
|
||||
Version.writeVersion(minVersion, out);
|
||||
}
|
||||
if (timestamp != null) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user