Skip to content

Commit

Permalink
Adjust version compatiblity after backport (#57805)
Browse files Browse the repository at this point in the history
For the ml delete expired data request changes in #57337
  • Loading branch information
davidkyle authored Jun 8, 2020
1 parent 695b242 commit 5a2add9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public Request(StreamInput in) throws IOException {
this.requestsPerSecond = null;
this.timeout = null;
}
if (in.getVersion().onOrAfter(Version.V_8_0_0)) { // TODO BWC for V_7_9_0
if (in.getVersion().onOrAfter(Version.V_7_9_0)) {
jobId = in.readString();
}
}
Expand Down Expand Up @@ -135,7 +135,7 @@ public void writeTo(StreamOutput out) throws IOException {
out.writeOptionalFloat(requestsPerSecond);
out.writeOptionalTimeValue(timeout);
}
if (out.getVersion().onOrAfter(Version.V_8_0_0)) { // TODO BWC for V_7_9_0
if (out.getVersion().onOrAfter(Version.V_7_9_0)) {
out.writeString(jobId);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ protected Request mutateInstanceForVersion(Request instance, Version version) {
if (version.before(Version.V_7_8_0)) {
return new Request();
}
if (version.before(Version.V_8_0_0)) { // TODO make V_7_9_0
if (version.before(Version.V_7_9_0)) {
Request request = new Request();
request.setRequestsPerSecond(instance.getRequestsPerSecond());
request.setTimeout(instance.getTimeout());
Expand Down

0 comments on commit 5a2add9

Please sign in to comment.