Skip to content

Commit

Permalink
[ML] Fix ML task auditor exception early in cluster lifecycle (#87023) (
Browse files Browse the repository at this point in the history
#87032)

In a very young cluster where there's never been a persistent
task it was possible that the ML task assignment auditor could
throw null pointer exceptions. Nothing particularly bad resulted
from this apart from filling up the log file with stack traces.

This PR avoids the problem.

Fixes #87002
  • Loading branch information
droberts195 committed May 23, 2022
1 parent 39ad3f0 commit aa481b6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/changelog/87023.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pr: 87023
summary: Fix ML task auditor exception early in cluster lifecycle
area: Machine Learning
type: bug
issues:
- 87002
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ private void auditMlTasks(
PersistentTasksCustomMetadata currentTasks,
boolean alwaysAuditUnassigned
) {
if (currentTasks == null) {
return;
}

for (PersistentTask<?> currentTask : currentTasks.tasks()) {
Assignment currentAssignment = currentTask.getAssignment();
Expand Down

0 comments on commit aa481b6

Please sign in to comment.