Skip to content

Commit

Permalink
Refine the error message on cluster status not ready scenario
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 23, 2024
1 parent de59efc commit 4c753c9
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import org.opensearch.action.search.SearchResponse;
import org.opensearch.client.Client;
import org.opensearch.client.OpenSearchClient;
import org.opensearch.cluster.block.ClusterBlockException;
import org.opensearch.cluster.service.ClusterService;
import org.opensearch.common.settings.Settings;
import org.opensearch.core.action.ActionListener;
Expand Down Expand Up @@ -187,6 +188,8 @@ private void triggerAutoDeployModels(List<String> addedNodes) {
}, e -> {
if (e instanceof IndexNotFoundException) {
log.info("Index not found, not performing auto reloading!");
} else if (e instanceof ClusterBlockException) {
log.info("Cluster status not ready, not performing auto reloading now!");
} else {
log.error("Failed to query need auto redeploy models, no action will be performed, addedNodes are: {}", addedNodes, e);
}
Expand Down

0 comments on commit 4c753c9

Please sign in to comment.