File tree Expand file tree Collapse file tree 6 files changed +10
-10
lines changed
main/java/org/elasticsearch/xpack/core/inference/action
test/java/org/elasticsearch/xpack/core/inference/action
inference/src/main/java/org/elasticsearch/xpack/inference/registry Expand file tree Collapse file tree 6 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -321,7 +321,6 @@ static TransportVersion def(int id) {
321321 public static final TransportVersion ML_INFERENCE_ELASTIC_DENSE_TEXT_EMBEDDINGS_ADDED = def (9_109_00_0 );
322322 public static final TransportVersion ML_INFERENCE_COHERE_API_VERSION = def (9_110_0_00 );
323323 public static final TransportVersion ESQL_PROFILE_INCLUDE_PLAN = def (9_111_0_00 );
324- public static final TransportVersion ML_INFERENCE_ENDPOINT_CACHE = def (9_157_0_00 );
325324 public static final TransportVersion INDEX_SOURCE = def (9_158_0_00 );
326325 public static final TransportVersion MAX_HEAP_SIZE_PER_NODE_IN_CLUSTER_INFO = def (9_159_0_00 );
327326 public static final TransportVersion TIMESERIES_DEFAULT_LIMIT = def (9_160_0_00 );
Original file line number Diff line number Diff line change 1+ 9157000
Original file line number Diff line number Diff line change 1- inference_api_eis_diagnostics,9156000
1+ ml_inference_endpoint_cache,9157000
Original file line number Diff line number Diff line change 2929import java .util .List ;
3030import java .util .Objects ;
3131
32- import static org .elasticsearch .TransportVersions .ML_INFERENCE_ENDPOINT_CACHE ;
33-
3432public class GetInferenceDiagnosticsAction extends ActionType <GetInferenceDiagnosticsAction .Response > {
3533
3634 public static final GetInferenceDiagnosticsAction INSTANCE = new GetInferenceDiagnosticsAction ();
3735 public static final String NAME = "cluster:monitor/xpack/inference/diagnostics/get" ;
36+
37+ private static final TransportVersion ML_INFERENCE_ENDPOINT_CACHE = TransportVersion .fromName ("ml_inference_endpoint_cache" );
3838 private static final TransportVersion INFERENCE_API_EIS_DIAGNOSTICS = TransportVersion .fromName ("inference_api_eis_diagnostics" );
3939
4040 public GetInferenceDiagnosticsAction () {
@@ -151,7 +151,7 @@ public NodeResponse(StreamInput in) throws IOException {
151151 } else {
152152 eisMtlsConnectionPoolStats = ConnectionPoolStats .EMPTY ;
153153 }
154- inferenceEndpointRegistryStats = in .getTransportVersion ().onOrAfter (ML_INFERENCE_ENDPOINT_CACHE )
154+ inferenceEndpointRegistryStats = in .getTransportVersion ().supports (ML_INFERENCE_ENDPOINT_CACHE )
155155 ? in .readOptionalWriteable (Stats ::new )
156156 : null ;
157157 }
@@ -164,7 +164,7 @@ public void writeTo(StreamOutput out) throws IOException {
164164 if (out .getTransportVersion ().supports (INFERENCE_API_EIS_DIAGNOSTICS )) {
165165 eisMtlsConnectionPoolStats .writeTo (out );
166166 }
167- if (out .getTransportVersion ().onOrAfter (ML_INFERENCE_ENDPOINT_CACHE )) {
167+ if (out .getTransportVersion ().supports (ML_INFERENCE_ENDPOINT_CACHE )) {
168168 out .writeOptionalWriteable (inferenceEndpointRegistryStats );
169169 }
170170 }
Original file line number Diff line number Diff line change 99
1010import org .apache .http .pool .PoolStats ;
1111import org .elasticsearch .TransportVersion ;
12- import org .elasticsearch .TransportVersions ;
1312import org .elasticsearch .cluster .node .DiscoveryNode ;
1413import org .elasticsearch .cluster .node .DiscoveryNodeUtils ;
1514import org .elasticsearch .common .Strings ;
2221public class GetInferenceDiagnosticsActionNodeResponseTests extends AbstractBWCWireSerializationTestCase <
2322 GetInferenceDiagnosticsAction .NodeResponse > {
2423
24+ private static final TransportVersion ML_INFERENCE_ENDPOINT_CACHE = TransportVersion .fromName ("ml_inference_endpoint_cache" );
2525 private static final TransportVersion INFERENCE_API_EIS_DIAGNOSTICS = TransportVersion .fromName ("inference_api_eis_diagnostics" );
2626
2727 public static GetInferenceDiagnosticsAction .NodeResponse createRandom () {
@@ -108,7 +108,7 @@ public static GetInferenceDiagnosticsAction.NodeResponse mutateNodeResponseForVe
108108 GetInferenceDiagnosticsAction .NodeResponse instance ,
109109 TransportVersion version
110110 ) {
111- if (version .onOrAfter ( TransportVersions . ML_INFERENCE_ENDPOINT_CACHE )) {
111+ if (version .supports ( ML_INFERENCE_ENDPOINT_CACHE )) {
112112 return instance ;
113113 }
114114
Original file line number Diff line number Diff line change 5050import java .util .Iterator ;
5151import java .util .Objects ;
5252
53- import static org .elasticsearch .TransportVersions .ML_INFERENCE_ENDPOINT_CACHE ;
54-
5553/**
5654 * Clears the cache in {@link InferenceEndpointRegistry}.
5755 * This uses the cluster state to broadcast the message to all nodes to clear their cache, which has guaranteed delivery.
@@ -66,6 +64,8 @@ public class ClearInferenceEndpointCacheAction extends AcknowledgedTransportMast
6664 public static final ActionType <AcknowledgedResponse > INSTANCE = new ActionType <>(NAME );
6765 private static final String TASK_QUEUE_NAME = "inference-endpoint-cache-management" ;
6866
67+ private static final TransportVersion ML_INFERENCE_ENDPOINT_CACHE = TransportVersion .fromName ("ml_inference_endpoint_cache" );
68+
6969 private final ProjectResolver projectResolver ;
7070 private final InferenceEndpointRegistry inferenceEndpointRegistry ;
7171 private final MasterServiceTaskQueue <RefreshCacheMetadataVersionTask > taskQueue ;
You can’t perform that action at this time.
0 commit comments