Skip to content

Commit 838563b

Browse files
Using less confusing variable name
1 parent 74fbaca commit 838563b

File tree

1 file changed

+3
-4
lines changed
  • x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/registry

1 file changed

+3
-4
lines changed

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,13 +187,12 @@ public boolean containsPreconfiguredInferenceEndpointId(String inferenceEntityId
187187
return true;
188188
}
189189

190-
// This checks the cluster state for user created endpoints as well as EIS preconfigured endpoints
190+
// This checks the cluster state for EIS preconfigured endpoints
191191
if (lastMetadata.get() != null) {
192192
var project = lastMetadata.get().getProject(ProjectId.DEFAULT);
193193
var state = ModelRegistryMetadata.fromState(project);
194-
var eisPreconfiguredEndpoints = state.getServiceInferenceIds(ElasticInferenceService.NAME);
195-
return eisPreconfiguredEndpoints.contains(inferenceEntityId)
196-
&& inferenceEntityId.startsWith(EIS_PRECONFIGURED_ENDPOINT_ID_PREFIX);
194+
var eisEndpoints = state.getServiceInferenceIds(ElasticInferenceService.NAME);
195+
return eisEndpoints.contains(inferenceEntityId) && inferenceEntityId.startsWith(EIS_PRECONFIGURED_ENDPOINT_ID_PREFIX);
197196
}
198197

199198
return false;

0 commit comments

Comments
 (0)