Skip to content

Commit 7b76e78

Browse files
opensearch-trigger-bot[bot]ylwu-amzn
authored andcommitted
fix no worker node error on multi-node cluster (opensearch-project#1487) (opensearch-project#1513)
Signed-off-by: Yaliang Wu <ylwu@amazon.com> (cherry picked from commit cea1cd6) Co-authored-by: Yaliang Wu <ylwu@amazon.com>
1 parent 0bb17ac commit 7b76e78

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

plugin/src/main/java/org/opensearch/ml/action/prediction/TransportPredictionTaskAction.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,8 @@ public void onFailure(Exception e) {
121121

122122
if (cachedMlModel != null) {
123123
modelActionListener.onResponse(cachedMlModel);
124-
} else if (modelAccessControlHelper.skipModelAccessControl(user)) {
125-
executePredict(mlPredictionTaskRequest, wrappedListener, modelId);
126124
} else {
125+
// For multi-node cluster, the function name is null in cache, so should always get model first.
127126
mlModelManager.getModel(modelId, modelActionListener);
128127
}
129128
}

0 commit comments

Comments
 (0)