Skip to content

Commit

Permalink
Fix a crash when unknown worker registering to raylet (#4992)
Browse files Browse the repository at this point in the history
  • Loading branch information
jovany-wang authored and raulchen committed Jun 17, 2019
1 parent 05e2748 commit b08765a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/ray/raylet/worker_pool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,10 @@ void WorkerPool::RegisterWorker(const std::shared_ptr<Worker> &worker) {
state.registered_workers.insert(std::move(worker));

auto it = state.starting_worker_processes.find(pid);
RAY_CHECK(it != state.starting_worker_processes.end());
if (it == state.starting_worker_processes.end()) {
RAY_LOG(WARNING) << "Received a register request from an unknown worker " << pid;
return;
}
it->second--;
if (it->second == 0) {
state.starting_worker_processes.erase(it);
Expand Down

0 comments on commit b08765a

Please sign in to comment.