diff --git a/plugin/src/main/java/org/opensearch/ml/autoredeploy/MLModelAutoReDeployer.java b/plugin/src/main/java/org/opensearch/ml/autoredeploy/MLModelAutoReDeployer.java index ff774ac0be..8d22e3bbe9 100644 --- a/plugin/src/main/java/org/opensearch/ml/autoredeploy/MLModelAutoReDeployer.java +++ b/plugin/src/main/java/org/opensearch/ml/autoredeploy/MLModelAutoReDeployer.java @@ -27,6 +27,7 @@ import org.opensearch.common.settings.Settings; import org.opensearch.core.action.ActionListener; import org.opensearch.core.common.Strings; +import org.opensearch.index.IndexNotFoundException; import org.opensearch.index.query.TermsQueryBuilder; import org.opensearch.ml.common.MLModel; import org.opensearch.ml.common.model.MLModelState; @@ -184,7 +185,11 @@ private void triggerAutoDeployModels(List addedNodes) { redeployAModel(); } }, e -> { - log.error("Failed to query need auto redeploy models, no action will be performed, addedNodes are: {}", addedNodes, e); + if (e instanceof IndexNotFoundException) { + log.info("Index not found, not performing auto reloading!"); + } else { + log.error("Failed to query need auto redeploy models, no action will be performed, addedNodes are: {}", addedNodes, e); + } startCronjobAndClearListener(); });