mirror of
https://github.com/wassname/ray.git
synced 2026-09-09 11:32:43 +08:00
Fix hang if actor object id is returned from a task that exits (#6885)
This commit is contained in:
@@ -288,13 +288,14 @@ void CoreWorker::SetCurrentTaskId(const TaskID &task_id) {
|
||||
absl::MutexLock lock(&mutex_);
|
||||
not_actor_task = actor_id_.IsNil();
|
||||
}
|
||||
// Clear all actor handles at the end of each non-actor task.
|
||||
if (not_actor_task && task_id.IsNil()) {
|
||||
absl::MutexLock lock(&actor_handles_mutex_);
|
||||
// Reset the seqnos so that for the next task it start off at 0.
|
||||
for (const auto &handle : actor_handles_) {
|
||||
RAY_CHECK_OK(gcs_client_->Actors().AsyncUnsubscribe(handle.first, nullptr));
|
||||
handle.second->Reset();
|
||||
}
|
||||
actor_handles_.clear();
|
||||
// TODO(ekl) we can't unsubscribe to actor notifications here due to
|
||||
// https://github.com/ray-project/ray/pull/6885
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user