Skip to content

Commit

Permalink
[ML] Adjust versions and unmute BWC tests after backport of #59254 (#…
Browse files Browse the repository at this point in the history
…59318)

Relates #59254
  • Loading branch information
dimitris-athanasiou committed Jul 9, 2020
1 parent a8aecb8 commit aacf624
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 33 deletions.
Expand Up @@ -173,11 +173,7 @@ public DataFrameAnalyticsConfig(StreamInput in) throws IOException {
} else {
allowLazyStart = false;
}
if (in.getVersion().onOrAfter(Version.V_8_0_0)) {
maxNumThreads = in.readVInt();
} else {
maxNumThreads = 1;
}
maxNumThreads = in.readVInt();
}

public String getId() {
Expand Down Expand Up @@ -289,9 +285,7 @@ public void writeTo(StreamOutput out) throws IOException {
if (out.getVersion().onOrAfter(Version.V_7_5_0)) {
out.writeBoolean(allowLazyStart);
}
if (out.getVersion().onOrAfter(Version.V_8_0_0)) {
out.writeVInt(maxNumThreads);
}
out.writeVInt(maxNumThreads);
}

@Override
Expand Down
Expand Up @@ -5,7 +5,6 @@
*/
package org.elasticsearch.xpack.core.ml.dataframe;

import org.elasticsearch.Version;
import org.elasticsearch.common.Nullable;
import org.elasticsearch.common.io.stream.StreamInput;
import org.elasticsearch.common.io.stream.StreamOutput;
Expand Down Expand Up @@ -66,11 +65,7 @@ public DataFrameAnalyticsConfigUpdate(StreamInput in) throws IOException {
this.description = in.readOptionalString();
this.modelMemoryLimit = in.readOptionalWriteable(ByteSizeValue::new);
this.allowLazyStart = in.readOptionalBoolean();
if (in.getVersion().onOrAfter(Version.V_8_0_0)) {
this.maxNumThreads = in.readOptionalVInt();
} else {
this.maxNumThreads = null;
}
this.maxNumThreads = in.readOptionalVInt();
}

@Override
Expand All @@ -79,9 +74,7 @@ public void writeTo(StreamOutput out) throws IOException {
out.writeOptionalString(description);
out.writeOptionalWriteable(modelMemoryLimit);
out.writeOptionalBoolean(allowLazyStart);
if (out.getVersion().onOrAfter(Version.V_8_0_0)) {
out.writeOptionalVInt(maxNumThreads);
}
out.writeOptionalVInt(maxNumThreads);
}

public String getId() {
Expand Down
Expand Up @@ -124,9 +124,6 @@ protected DataFrameAnalyticsConfig mutateInstanceForVersion(DataFrameAnalyticsCo
builder.setCreateTime(null);
builder.setVersion(null);
}
if (version.before(Version.V_8_0_0)) {
builder.setMaxNumThreads(null);
}
return builder.build();
}

Expand Down
@@ -1,8 +1,3 @@
setup:
- skip:
version: "all"
reason: "Until backport of https://github.com/elastic/elasticsearch/pull/59254"

---
"Get old outlier_detection job":

Expand Down
@@ -1,7 +1,4 @@
setup:
- skip:
version: "all"
reason: "Until backport of https://github.com/elastic/elasticsearch/pull/59254"

- do:
index:
Expand Down
@@ -1,8 +1,3 @@
setup:
- skip:
version: "all"
reason: "Until backport of https://github.com/elastic/elasticsearch/pull/59254"

---
"Get old cluster outlier_detection job":

Expand Down

0 comments on commit aacf624

Please sign in to comment.