Skip to content

Commit

Permalink
Fix model not deploy issue under intensive prediction taskks
Browse files Browse the repository at this point in the history
Signed-off-by: zane-neo <[email protected]>
  • Loading branch information
zane-neo committed Jan 23, 2024
1 parent de59efc commit 9d7b9dc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,10 @@ void cleanUpLocalCache(Map<String, Set<String>> runningDeployModelTasks) {
}
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;
}
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

0 comments on commit 9d7b9dc

Please sign in to comment.