Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/changelog/115430.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 115430
summary: Prevent NPE if model assignment is removed while waiting to start
area: Machine Learning
type: bug
issues: []
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,11 @@ public boolean test(ClusterState clusterState) {
deploymentId
).orElse(null);
if (trainedModelAssignment == null) {
// Something weird happened, it should NEVER be null...
// The assignment may be null if it was stopped by another action while waiting
this.exception = new ElasticsearchStatusException(
"Error waiting for the model deployment to start. The trained model assignment was removed while waiting",
RestStatus.BAD_REQUEST
);
logger.trace(() -> format("[%s] assignment was null while waiting for state [%s]", deploymentId, waitForState));
return true;
}
Expand Down