Skip to content

Commit 85ba05a

Browse files
committed
Update transport version
1 parent 6e38b32 commit 85ba05a

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

server/src/main/java/org/elasticsearch/TransportVersions.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,7 @@ static TransportVersion def(int id) {
358358
public static final TransportVersion ALLOCATION_DECISION_NOT_PREFERRED = def(9_145_0_00);
359359
public static final TransportVersion ESQL_QUALIFIERS_IN_ATTRIBUTES = def(9_146_0_00);
360360
public static final TransportVersion PROJECT_RESERVED_STATE_MOVE_TO_REGISTRY = def(9_147_0_00);
361+
public static final TransportVersion ML_INFERENCE_ENDPOINT_CACHE = def(9_148_0_00);
361362

362363
/*
363364
* STOP! READ THIS FIRST! No, really,

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/inference/action/GetInferenceDiagnosticsAction.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
package org.elasticsearch.xpack.core.inference.action;
99

1010
import org.apache.http.pool.PoolStats;
11-
import org.elasticsearch.TransportVersion;
1211
import org.elasticsearch.action.ActionType;
1312
import org.elasticsearch.action.FailedNodeException;
1413
import org.elasticsearch.action.support.nodes.BaseNodeResponse;
@@ -30,6 +29,8 @@
3029
import java.util.List;
3130
import java.util.Objects;
3231

32+
import static org.elasticsearch.TransportVersions.ML_INFERENCE_ENDPOINT_CACHE;
33+
3334
public class GetInferenceDiagnosticsAction extends ActionType<GetInferenceDiagnosticsAction.Response> {
3435

3536
public static final GetInferenceDiagnosticsAction INSTANCE = new GetInferenceDiagnosticsAction();
@@ -135,7 +136,7 @@ public NodeResponse(StreamInput in) throws IOException {
135136
super(in);
136137

137138
connectionPoolStats = new ConnectionPoolStats(in);
138-
inferenceEndpointRegistryStats = in.getTransportVersion().onOrAfter(TransportVersion.current())
139+
inferenceEndpointRegistryStats = in.getTransportVersion().onOrAfter(ML_INFERENCE_ENDPOINT_CACHE)
139140
? in.readOptionalNamedWriteable(SerializableStats.class)
140141
: null;
141142
}
@@ -144,7 +145,7 @@ public NodeResponse(StreamInput in) throws IOException {
144145
public void writeTo(StreamOutput out) throws IOException {
145146
super.writeTo(out);
146147
connectionPoolStats.writeTo(out);
147-
if (out.getTransportVersion().onOrAfter(TransportVersion.current())) {
148+
if (out.getTransportVersion().onOrAfter(ML_INFERENCE_ENDPOINT_CACHE)) {
148149
out.writeOptionalNamedWriteable(inferenceEndpointRegistryStats);
149150
}
150151
}

x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/registry/ClearInferenceEndpointCacheAction.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@
5050
import java.util.Iterator;
5151
import java.util.Objects;
5252

53+
import static org.elasticsearch.TransportVersions.ML_INFERENCE_ENDPOINT_CACHE;
54+
5355
/**
5456
* Clears the cache in {@link InferenceEndpointRegistry}. This uses a master node transport action, even though most requests will originate
5557
* from the master node (when updating and deleting inference endpoints via REST), because there are some edge cases where deletes can come
@@ -185,7 +187,7 @@ public EnumSet<Metadata.XContentContext> context() {
185187

186188
@Override
187189
public TransportVersion getMinimalSupportedVersion() {
188-
return TransportVersion.current();
190+
return ML_INFERENCE_ENDPOINT_CACHE;
189191
}
190192

191193
@Override

0 commit comments

Comments
 (0)