Skip to content

Commit

Permalink
Use TransportVersion V9
Browse files Browse the repository at this point in the history
  • Loading branch information
arteam committed Feb 4, 2025
1 parent 4fba814 commit 6c0bc0c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ static TransportVersion def(int id) {
public static final TransportVersion INFERENCE_REQUEST_ADAPTIVE_RATE_LIMITING = def(8_839_0_00);
public static final TransportVersion ML_INFERENCE_IBM_WATSONX_RERANK_ADDED = def(8_840_0_00);
public static final TransportVersion ELASTICSEARCH_9_0 = def(9_000_0_00);
public static final TransportVersion REMOVE_DESIRED_NODE_VERSION = def(9_000_0_01);

/*
* STOP! READ THIS FIRST! No, really,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,7 @@ public static DesiredNode readFrom(StreamInput in) throws IOException {
}
final var memory = ByteSizeValue.readFrom(in);
final var storage = ByteSizeValue.readFrom(in);
// if (in.getTransportVersion().before(TransportVersion.V_9_00_0)) {
if (true) {
if (in.getTransportVersion().before(TransportVersions.REMOVE_DESIRED_NODE_VERSION)) {
final String version;
if (in.getTransportVersion().onOrAfter(TransportVersions.V_8_13_0)) {
version = in.readOptionalString();
Expand All @@ -187,8 +186,7 @@ public void writeTo(StreamOutput out) throws IOException {
}
memory.writeTo(out);
storage.writeTo(out);
// if (out.getTransportVersion().before(TransportVersion.V_9_00_0)) {
if (true) {
if (out.getTransportVersion().before(TransportVersions.REMOVE_DESIRED_NODE_VERSION)) {
if (out.getTransportVersion().onOrAfter(TransportVersions.V_8_13_0)) {
out.writeOptionalString(null);
} else {
Expand Down

0 comments on commit 6c0bc0c

Please sign in to comment.