mirror of
https://github.com/vale981/ray
synced 2025-03-06 10:31: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,6 +215,9 @@ void OwnershipBasedObjectDirectory::SubscriptionCallback(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Only send the next long-polling RPC if the last one was successful.
|
||||||
|
// If the last RPC failed, we consider the object to have been freed.
|
||||||
|
if (status.ok()) {
|
||||||
auto worker_it = worker_rpc_clients_.find(worker_id);
|
auto worker_it = worker_rpc_clients_.find(worker_id);
|
||||||
rpc::GetObjectLocationsOwnerRequest request;
|
rpc::GetObjectLocationsOwnerRequest request;
|
||||||
request.set_intended_worker_id(worker_id.Binary());
|
request.set_intended_worker_id(worker_id.Binary());
|
||||||
|
@ -225,6 +228,7 @@ void OwnershipBasedObjectDirectory::SubscriptionCallback(
|
||||||
std::bind(&OwnershipBasedObjectDirectory::SubscriptionCallback, this, object_id,
|
std::bind(&OwnershipBasedObjectDirectory::SubscriptionCallback, this, object_id,
|
||||||
worker_id, std::placeholders::_1, std::placeholders::_2));
|
worker_id, std::placeholders::_1, std::placeholders::_2));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ray::Status OwnershipBasedObjectDirectory::SubscribeObjectLocations(
|
ray::Status OwnershipBasedObjectDirectory::SubscribeObjectLocations(
|
||||||
const UniqueID &callback_id, const ObjectID &object_id,
|
const UniqueID &callback_id, const ObjectID &object_id,
|
||||||
|
|
Loading…
Add table
Reference in a new issue