[GCS] Fix the bug about raylet receiving duplicate actor creation tasks (#9422)

This commit is contained in:
Hao Chen
2020-07-13 11:34:02 -07:00
committed by GitHub
parent 5291bf235b
commit e6225bdfa1
+5 -1
View File
@@ -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 "