Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix model not deploy issue under intensive prediction tasks #1903

Merged
merged 1 commit into from
Jan 26, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,10 @@
}
for (String taskId : allTaskIds) {
MLTaskCache mlTaskCache = mlTaskManager.getMLTaskCache(taskId);
// Task could be a prediction task, and it could be completed and removed from cache in predict thread during the cleaning up.
if (mlTaskCache == null) {
continue;

Check warning on line 203 in plugin/src/main/java/org/opensearch/ml/action/syncup/TransportSyncUpOnNodeAction.java

View check run for this annotation

Codecov / codecov/patch

plugin/src/main/java/org/opensearch/ml/action/syncup/TransportSyncUpOnNodeAction.java#L203

Added line #L203 was not covered by tests
}
MLTask mlTask = mlTaskCache.getMlTask();
Instant lastUpdateTime = mlTask.getLastUpdateTime();
Instant now = Instant.now();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public synchronized void add(MLTask mlTask, List<String> workerNodes) {
throw new IllegalArgumentException("Duplicate taskId");
}
taskCaches.put(taskId, new MLTaskCache(mlTask, workerNodes));
log.debug("add ML task to cache " + taskId);
log.debug("add ML task to cache, taskId: {}, taskType: {} ", taskId, mlTask.getTaskType());
}

/**
Expand Down
Loading