Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core] Fix a corner case where QueryAllWorkerStates never return #37496

Merged
merged 2 commits into from
Jul 19, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/ray/raylet/node_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -894,10 +894,13 @@ void NodeManager::QueryAllWorkerStates(
// Query all workers.
auto rpc_replied = std::make_shared<size_t>(0);
auto num_workers = all_workers.size();
bool all_dead = true;
for (const auto &worker : all_workers) {
if (worker->IsDead()) {
*rpc_replied += 1;
continue;
}
all_dead = false;
rpc::GetCoreWorkerStatsRequest request;
request.set_intended_worker_id(worker->WorkerId().Binary());
request.set_include_memory_info(include_memory_info);
Expand All @@ -922,6 +925,9 @@ void NodeManager::QueryAllWorkerStates(
}
});
}
if(all_dead) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if(all_dead) {
if (all_dead) {

send_reply_callback(Status::OK(), nullptr, nullptr);
}
}

// This warns users that there could be the resource deadlock. It works this way;
Expand Down
Loading