[GCS]Fix a bug that creates invalid connection (#11590)

Co-authored-by: 灵洵 <fengbin.ffb@antfin.com>
This commit is contained in:
fangfengbin 2020-10-28 01:08:06 +08:00 committed by GitHub
parent d9f1874e34
commit ebe9a8865c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -952,14 +952,6 @@ void GcsActorManager::LoadInitialData(const EmptyCallback &done) {
PollOwnerForActorOutOfScope(actor);
}
auto &workers = owners_[actor->GetNodeID()];
auto it = workers.find(actor->GetWorkerID());
if (it == workers.end()) {
std::shared_ptr<rpc::CoreWorkerClientInterface> client =
worker_client_factory_(actor->GetOwnerAddress());
workers.emplace(actor->GetOwnerID(), Owner(std::move(client)));
}
if (!actor->GetWorkerID().IsNil()) {
RAY_CHECK(!actor->GetNodeID().IsNil());
node_to_workers[actor->GetNodeID()].emplace_back(actor->GetWorkerID());