Skip to content

Commit

Permalink
Revert "[ML][backport] Warn for model load failures if they have a st…
Browse files Browse the repository at this point in the history
…atus code <500"

This reverts commit e5b5b6e.
  • Loading branch information
maxhniebergall committed Sep 23, 2024
1 parent e5b5b6e commit f93678d
Showing 1 changed file with 0 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.elasticsearch.ElasticsearchException;
import org.elasticsearch.ResourceNotFoundException;
import org.elasticsearch.action.ActionListener;
import org.elasticsearch.action.search.SearchPhaseExecutionException;
Expand Down Expand Up @@ -755,12 +754,6 @@ private void updateStoredState(String deploymentId, RoutingInfoUpdate update, Ac

private void handleLoadFailure(TrainedModelDeploymentTask task, Exception ex) {
logger.error(() -> "[" + task.getDeploymentId() + "] model [" + task.getParams().getModelId() + "] failed to load", ex);
private void handleLoadFailure(TrainedModelDeploymentTask task, Exception ex, ActionListener<Boolean> retryListener) {
if (ex instanceof ElasticsearchException esEx && esEx.status().getStatus() < 500) {
logger.warn(() -> "[" + task.getDeploymentId() + "] model [" + task.getParams().getModelId() + "] failed to load", ex);
} else {
logger.error(() -> "[" + task.getDeploymentId() + "] model [" + task.getParams().getModelId() + "] failed to load", ex);
}
if (task.isStopped()) {
logger.debug(
() -> format(
Expand Down

0 comments on commit f93678d

Please sign in to comment.