From e6225bdfa1d534fd4d70a61b70a3197425e79d1f Mon Sep 17 00:00:00 2001 From: Hao Chen Date: Tue, 14 Jul 2020 02:34:02 +0800 Subject: [PATCH] [GCS] Fix the bug about raylet receiving duplicate actor creation tasks (#9422) --- src/ray/raylet/node_manager.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ray/raylet/node_manager.cc b/src/ray/raylet/node_manager.cc index 3bb0c0e1e..7927d384d 100644 --- a/src/ray/raylet/node_manager.cc +++ b/src/ray/raylet/node_manager.cc @@ -2300,7 +2300,11 @@ void NodeManager::SubmitTask(const Task &task, const Lineage &uncommitted_lineag RAY_LOG(DEBUG) << "Submitting task: " << task.DebugString(); if (local_queues_.HasTask(task_id)) { - if (spec.IsActorCreationTask()) { + if (RayConfig::instance().gcs_actor_service_enabled() && spec.IsActorCreationTask()) { + // NOTE(hchen): Normally when raylet receives a duplicated actor creation task + // from GCS, raylet should just ignore the task. However, due to the hack that + // we save the RPC reply in task's OnDispatch callback, we have to remove the + // old task and re-add the new task, to make sure the RPC reply callback is correct. RAY_LOG(WARNING) << "Submitted actor creation task " << task_id << " is already queued. This is most likely due to a GCS restart. " "We will remove "