Avoid fate sharing with owner for detached actors (#8267)

This commit is contained in:
Edward Oakes
2020-05-01 11:58:47 -05:00
committed by GitHub
parent 63bc7dc522
commit 3aec683f61
2 changed files with 3 additions and 6 deletions
+3 -3
View File
@@ -2514,9 +2514,9 @@ void NodeManager::AssignTask(const std::shared_ptr<Worker> &worker, const Task &
: worker->GetTaskResourceIds());
// If the owner has died since this task was queued, cancel the task by
// killing the worker.
if (failed_workers_cache_.count(owner_worker_id) > 0 ||
failed_nodes_cache_.count(owner_node_id) > 0) {
// killing the worker (unless this task is for a detached actor).
if (!worker->IsDetachedActor() && (failed_workers_cache_.count(owner_worker_id) > 0 ||
failed_nodes_cache_.count(owner_node_id) > 0)) {
// TODO(swang): Skip assigning this task to this worker instead of
// killing the worker?
KillWorker(worker);