diff --git a/ml-algorithms/src/main/java/org/opensearch/ml/engine/utils/AgentModelsSearcher.java b/ml-algorithms/src/main/java/org/opensearch/ml/engine/utils/AgentModelsSearcher.java index 01ac8b2225..ce5505432b 100644 --- a/ml-algorithms/src/main/java/org/opensearch/ml/engine/utils/AgentModelsSearcher.java +++ b/ml-algorithms/src/main/java/org/opensearch/ml/engine/utils/AgentModelsSearcher.java @@ -23,8 +23,7 @@ public AgentModelsSearcher(Map toolFactories) { relatedModelIdSet.addAll(toolFactory.getAllModelKeys()); } } - - + public SearchRequest constructQueryRequestToSearchModelId(String candidateModelId) { SearchRequest searchRequest = new SearchRequest(ML_AGENT_INDEX); BoolQueryBuilder shouldQuery = QueryBuilders.boolQuery(); diff --git a/plugin/src/main/java/org/opensearch/ml/action/models/DeleteModelTransportAction.java b/plugin/src/main/java/org/opensearch/ml/action/models/DeleteModelTransportAction.java index bb30a41592..960e550ba5 100644 --- a/plugin/src/main/java/org/opensearch/ml/action/models/DeleteModelTransportAction.java +++ b/plugin/src/main/java/org/opensearch/ml/action/models/DeleteModelTransportAction.java @@ -23,7 +23,6 @@ import java.util.List; import java.util.Locale; import java.util.Map; -import java.util.Objects; import java.util.concurrent.ConcurrentLinkedQueue; import java.util.concurrent.CountDownLatch; import java.util.concurrent.atomic.AtomicBoolean; @@ -335,7 +334,7 @@ private void checkPipelineBeforeDeleteModel( } private void checkDownstreamTaskBeforeDeleteModel(String modelId, Boolean isHidden, ActionListener actionListener) { - // Now 3 is: 1. Agent 2. Search pipeline 3. ingest pipeline + // Now checks 3 resources associated with with the model id 1. Agent 2. Search pipeline 3. ingest pipeline CountDownLatch countDownLatch = new CountDownLatch(3); AtomicBoolean noneBlocked = new AtomicBoolean(true); ConcurrentLinkedQueue errorMessages = new ConcurrentLinkedQueue<>();