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) {
321
321
public static final TransportVersion ML_INFERENCE_ELASTIC_DENSE_TEXT_EMBEDDINGS_ADDED = def (9_109_00_0 );
322
322
public static final TransportVersion ML_INFERENCE_COHERE_API_VERSION = def (9_110_0_00 );
323
323
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 );
325
324
public static final TransportVersion INDEX_SOURCE = def (9_158_0_00 );
326
325
public static final TransportVersion MAX_HEAP_SIZE_PER_NODE_IN_CLUSTER_INFO = def (9_159_0_00 );
327
326
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 29
29
import java .util .List ;
30
30
import java .util .Objects ;
31
31
32
- import static org .elasticsearch .TransportVersions .ML_INFERENCE_ENDPOINT_CACHE ;
33
-
34
32
public class GetInferenceDiagnosticsAction extends ActionType <GetInferenceDiagnosticsAction .Response > {
35
33
36
34
public static final GetInferenceDiagnosticsAction INSTANCE = new GetInferenceDiagnosticsAction ();
37
35
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" );
38
38
private static final TransportVersion INFERENCE_API_EIS_DIAGNOSTICS = TransportVersion .fromName ("inference_api_eis_diagnostics" );
39
39
40
40
public GetInferenceDiagnosticsAction () {
@@ -151,7 +151,7 @@ public NodeResponse(StreamInput in) throws IOException {
151
151
} else {
152
152
eisMtlsConnectionPoolStats = ConnectionPoolStats .EMPTY ;
153
153
}
154
- inferenceEndpointRegistryStats = in .getTransportVersion ().onOrAfter (ML_INFERENCE_ENDPOINT_CACHE )
154
+ inferenceEndpointRegistryStats = in .getTransportVersion ().supports (ML_INFERENCE_ENDPOINT_CACHE )
155
155
? in .readOptionalWriteable (Stats ::new )
156
156
: null ;
157
157
}
@@ -164,7 +164,7 @@ public void writeTo(StreamOutput out) throws IOException {
164
164
if (out .getTransportVersion ().supports (INFERENCE_API_EIS_DIAGNOSTICS )) {
165
165
eisMtlsConnectionPoolStats .writeTo (out );
166
166
}
167
- if (out .getTransportVersion ().onOrAfter (ML_INFERENCE_ENDPOINT_CACHE )) {
167
+ if (out .getTransportVersion ().supports (ML_INFERENCE_ENDPOINT_CACHE )) {
168
168
out .writeOptionalWriteable (inferenceEndpointRegistryStats );
169
169
}
170
170
}
Original file line number Diff line number Diff line change 9
9
10
10
import org .apache .http .pool .PoolStats ;
11
11
import org .elasticsearch .TransportVersion ;
12
- import org .elasticsearch .TransportVersions ;
13
12
import org .elasticsearch .cluster .node .DiscoveryNode ;
14
13
import org .elasticsearch .cluster .node .DiscoveryNodeUtils ;
15
14
import org .elasticsearch .common .Strings ;
22
21
public class GetInferenceDiagnosticsActionNodeResponseTests extends AbstractBWCWireSerializationTestCase <
23
22
GetInferenceDiagnosticsAction .NodeResponse > {
24
23
24
+ private static final TransportVersion ML_INFERENCE_ENDPOINT_CACHE = TransportVersion .fromName ("ml_inference_endpoint_cache" );
25
25
private static final TransportVersion INFERENCE_API_EIS_DIAGNOSTICS = TransportVersion .fromName ("inference_api_eis_diagnostics" );
26
26
27
27
public static GetInferenceDiagnosticsAction .NodeResponse createRandom () {
@@ -108,7 +108,7 @@ public static GetInferenceDiagnosticsAction.NodeResponse mutateNodeResponseForVe
108
108
GetInferenceDiagnosticsAction .NodeResponse instance ,
109
109
TransportVersion version
110
110
) {
111
- if (version .onOrAfter ( TransportVersions . ML_INFERENCE_ENDPOINT_CACHE )) {
111
+ if (version .supports ( ML_INFERENCE_ENDPOINT_CACHE )) {
112
112
return instance ;
113
113
}
114
114
Original file line number Diff line number Diff line change 50
50
import java .util .Iterator ;
51
51
import java .util .Objects ;
52
52
53
- import static org .elasticsearch .TransportVersions .ML_INFERENCE_ENDPOINT_CACHE ;
54
-
55
53
/**
56
54
* Clears the cache in {@link InferenceEndpointRegistry}.
57
55
* 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
66
64
public static final ActionType <AcknowledgedResponse > INSTANCE = new ActionType <>(NAME );
67
65
private static final String TASK_QUEUE_NAME = "inference-endpoint-cache-management" ;
68
66
67
+ private static final TransportVersion ML_INFERENCE_ENDPOINT_CACHE = TransportVersion .fromName ("ml_inference_endpoint_cache" );
68
+
69
69
private final ProjectResolver projectResolver ;
70
70
private final InferenceEndpointRegistry inferenceEndpointRegistry ;
71
71
private final MasterServiceTaskQueue <RefreshCacheMetadataVersionTask > taskQueue ;
You can’t perform that action at this time.
0 commit comments