diff --git a/plugin/src/main/java/org/opensearch/ml/action/prediction/TransportPredictionTaskAction.java b/plugin/src/main/java/org/opensearch/ml/action/prediction/TransportPredictionTaskAction.java index 1d58a5d0db..63be5e2423 100644 --- a/plugin/src/main/java/org/opensearch/ml/action/prediction/TransportPredictionTaskAction.java +++ b/plugin/src/main/java/org/opensearch/ml/action/prediction/TransportPredictionTaskAction.java @@ -121,9 +121,8 @@ public void onFailure(Exception e) { if (cachedMlModel != null) { modelActionListener.onResponse(cachedMlModel); - } else if (modelAccessControlHelper.skipModelAccessControl(user)) { - executePredict(mlPredictionTaskRequest, wrappedListener, modelId); } else { + // For multi-node cluster, the function name is null in cache, so should always get model first. mlModelManager.getModel(modelId, modelActionListener); } }