mirror of
https://github.com/vale981/ray
synced 2025-03-06 02:21:39 -05:00
Fix a crash when unknown worker registering to raylet (#4992)
This commit is contained in:
parent
05e2748070
commit
b08765a08b
1 changed files with 4 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue