From 5a2add95cd7bdbd1ee6c4f811c130717513d8d9d Mon Sep 17 00:00:00 2001 From: David Kyle Date: Mon, 8 Jun 2020 13:13:11 +0100 Subject: [PATCH] Adjust version compatiblity after backport (#57805) For the ml delete expired data request changes in #57337 --- .../xpack/core/ml/action/DeleteExpiredDataAction.java | 4 ++-- .../core/ml/action/DeleteExpiredDataActionRequestTests.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/DeleteExpiredDataAction.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/DeleteExpiredDataAction.java index 717d091628bf0..bf0502a426d5d 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/DeleteExpiredDataAction.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/DeleteExpiredDataAction.java @@ -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(); } } @@ -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); } } diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/DeleteExpiredDataActionRequestTests.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/DeleteExpiredDataActionRequestTests.java index 8ef90e522a950..be6629ddd531e 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/DeleteExpiredDataActionRequestTests.java +++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/DeleteExpiredDataActionRequestTests.java @@ -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());