Skip to content

Commit dd27af6

Browse files
authored
[ML] Adjust BWC version following backport (#47996)
The BWC version for auto-stopping datafeeds should be 7.5.0 now #47922 is backported.
1 parent 025a0d5 commit dd27af6

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/datafeed/DatafeedConfig.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,7 @@ public DatafeedConfig(StreamInput in) throws IOException {
223223
this.chunkingConfig = in.readOptionalWriteable(ChunkingConfig::new);
224224
this.headers = Collections.unmodifiableMap(in.readMap(StreamInput::readString, StreamInput::readString));
225225
delayedDataCheckConfig = in.readOptionalWriteable(DelayedDataCheckConfig::new);
226-
// TODO: change version in backport
227-
if (in.getVersion().onOrAfter(Version.V_8_0_0)) {
226+
if (in.getVersion().onOrAfter(Version.V_7_5_0)) {
228227
maxEmptySearches = in.readOptionalVInt();
229228
} else {
230229
maxEmptySearches = null;
@@ -429,8 +428,7 @@ public void writeTo(StreamOutput out) throws IOException {
429428
out.writeOptionalWriteable(chunkingConfig);
430429
out.writeMap(headers, StreamOutput::writeString, StreamOutput::writeString);
431430
out.writeOptionalWriteable(delayedDataCheckConfig);
432-
// TODO: change version in backport
433-
if (out.getVersion().onOrAfter(Version.V_8_0_0)) {
431+
if (out.getVersion().onOrAfter(Version.V_7_5_0)) {
434432
out.writeOptionalVInt(maxEmptySearches);
435433
}
436434
}

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/datafeed/DatafeedUpdate.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,7 @@ public DatafeedUpdate(StreamInput in) throws IOException {
144144
this.scrollSize = in.readOptionalVInt();
145145
this.chunkingConfig = in.readOptionalWriteable(ChunkingConfig::new);
146146
delayedDataCheckConfig = in.readOptionalWriteable(DelayedDataCheckConfig::new);
147-
// TODO: change version in backport
148-
if (in.getVersion().onOrAfter(Version.V_8_0_0)) {
147+
if (in.getVersion().onOrAfter(Version.V_7_5_0)) {
149148
maxEmptySearches = in.readOptionalInt();
150149
} else {
151150
maxEmptySearches = null;
@@ -193,8 +192,7 @@ public void writeTo(StreamOutput out) throws IOException {
193192
out.writeOptionalVInt(scrollSize);
194193
out.writeOptionalWriteable(chunkingConfig);
195194
out.writeOptionalWriteable(delayedDataCheckConfig);
196-
// TODO: change version in backport
197-
if (out.getVersion().onOrAfter(Version.V_8_0_0)) {
195+
if (out.getVersion().onOrAfter(Version.V_7_5_0)) {
198196
out.writeOptionalInt(maxEmptySearches);
199197
}
200198
}

0 commit comments

Comments
 (0)