Skip to content

Commit 7f4ef5b

Browse files
authored
Use specific version constant for wire bwc check (#44316)
This commit modifies bwc behavior in FindFileStructureAction to check against a concrete version instead of Version.CURRENT. Checking against Version.CURRENT does not work since it is changing, in addition to it having different meanings on each branch. relates #42501
1 parent 827383a commit 7f4ef5b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/FindFileStructureAction.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ public ActionRequestValidationException validate() {
338338
public void readFrom(StreamInput in) throws IOException {
339339
super.readFrom(in);
340340
linesToSample = in.readOptionalVInt();
341-
if (in.getVersion().onOrAfter(Version.CURRENT)) {
341+
if (in.getVersion().onOrAfter(Version.V_7_3_0)) {
342342
lineMergeSizeLimit = in.readOptionalVInt();
343343
}
344344
timeout = in.readOptionalTimeValue();
@@ -359,7 +359,7 @@ public void readFrom(StreamInput in) throws IOException {
359359
public void writeTo(StreamOutput out) throws IOException {
360360
super.writeTo(out);
361361
out.writeOptionalVInt(linesToSample);
362-
if (out.getVersion().onOrAfter(Version.CURRENT)) {
362+
if (out.getVersion().onOrAfter(Version.V_7_3_0)) {
363363
out.writeOptionalVInt(lineMergeSizeLimit);
364364
}
365365
out.writeOptionalTimeValue(timeout);

0 commit comments

Comments
 (0)