Skip to content

Commit

Permalink
Fine tune log message based on error type
Browse files Browse the repository at this point in the history
Signed-off-by: zane-neo <[email protected]>
  • Loading branch information
zane-neo committed Jan 6, 2024
1 parent 8352e69 commit 5dde9a6
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -184,7 +185,11 @@ private void triggerAutoDeployModels(List<String> 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();
});

Expand Down

0 comments on commit 5dde9a6

Please sign in to comment.