mirror of
https://github.com/vale981/ray
synced 2025-03-06 02:21:39 -05:00
Cancel object location long-poll on object free. (#14165)
This commit is contained in:
parent
dfb86e0a8f
commit
c092a5d184
1 changed files with 13 additions and 9 deletions
|
@ -215,15 +215,19 @@ void OwnershipBasedObjectDirectory::SubscriptionCallback(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
auto worker_it = worker_rpc_clients_.find(worker_id);
|
// Only send the next long-polling RPC if the last one was successful.
|
||||||
rpc::GetObjectLocationsOwnerRequest request;
|
// If the last RPC failed, we consider the object to have been freed.
|
||||||
request.set_intended_worker_id(worker_id.Binary());
|
if (status.ok()) {
|
||||||
request.set_object_id(object_id.Binary());
|
auto worker_it = worker_rpc_clients_.find(worker_id);
|
||||||
request.set_last_version(reply.current_version());
|
rpc::GetObjectLocationsOwnerRequest request;
|
||||||
worker_it->second->GetObjectLocationsOwner(
|
request.set_intended_worker_id(worker_id.Binary());
|
||||||
request,
|
request.set_object_id(object_id.Binary());
|
||||||
std::bind(&OwnershipBasedObjectDirectory::SubscriptionCallback, this, object_id,
|
request.set_last_version(reply.current_version());
|
||||||
worker_id, std::placeholders::_1, std::placeholders::_2));
|
worker_it->second->GetObjectLocationsOwner(
|
||||||
|
request,
|
||||||
|
std::bind(&OwnershipBasedObjectDirectory::SubscriptionCallback, this, object_id,
|
||||||
|
worker_id, std::placeholders::_1, std::placeholders::_2));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ray::Status OwnershipBasedObjectDirectory::SubscribeObjectLocations(
|
ray::Status OwnershipBasedObjectDirectory::SubscribeObjectLocations(
|
||||||
|
|
Loading…
Add table
Reference in a new issue