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
This commit is contained in:
parent
2203d447aa
commit
fc6a31e141
|
@ -338,7 +338,7 @@ public class FindFileStructureAction extends StreamableResponseActionType<FindFi
|
||||||
public void readFrom(StreamInput in) throws IOException {
|
public void readFrom(StreamInput in) throws IOException {
|
||||||
super.readFrom(in);
|
super.readFrom(in);
|
||||||
linesToSample = in.readOptionalVInt();
|
linesToSample = in.readOptionalVInt();
|
||||||
if (in.getVersion().onOrAfter(Version.CURRENT)) {
|
if (in.getVersion().onOrAfter(Version.V_7_3_0)) {
|
||||||
lineMergeSizeLimit = in.readOptionalVInt();
|
lineMergeSizeLimit = in.readOptionalVInt();
|
||||||
}
|
}
|
||||||
timeout = in.readOptionalTimeValue();
|
timeout = in.readOptionalTimeValue();
|
||||||
|
@ -359,7 +359,7 @@ public class FindFileStructureAction extends StreamableResponseActionType<FindFi
|
||||||
public void writeTo(StreamOutput out) throws IOException {
|
public void writeTo(StreamOutput out) throws IOException {
|
||||||
super.writeTo(out);
|
super.writeTo(out);
|
||||||
out.writeOptionalVInt(linesToSample);
|
out.writeOptionalVInt(linesToSample);
|
||||||
if (out.getVersion().onOrAfter(Version.CURRENT)) {
|
if (out.getVersion().onOrAfter(Version.V_7_3_0)) {
|
||||||
out.writeOptionalVInt(lineMergeSizeLimit);
|
out.writeOptionalVInt(lineMergeSizeLimit);
|
||||||
}
|
}
|
||||||
out.writeOptionalTimeValue(timeout);
|
out.writeOptionalTimeValue(timeout);
|
||||||
|
|
Loading…
Reference in New Issue