Skip to content

Commit

Permalink
[core] loosen the check on release object (ray-project#39570)
Browse files Browse the repository at this point in the history
This check is probably too strict, as the same client might call release object multiple times. This is a benign behavior and we shouldn't crash.
  • Loading branch information
scv119 committed Sep 12, 2023
1 parent 459d918 commit 6cc3cda
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/ray/object_manager/plasma/store.cc
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,10 @@ int PlasmaStore::RemoveFromClientObjectIds(const ObjectID &object_id,
void PlasmaStore::ReleaseObject(const ObjectID &object_id,
const std::shared_ptr<Client> &client) {
auto entry = object_lifecycle_mgr_.GetObject(object_id);
RAY_CHECK(entry != nullptr);
// Remove the client from the object's array of clients.
RAY_CHECK(RemoveFromClientObjectIds(object_id, client) == 1);
if (entry != nullptr) {
// Remove the client from the object's array of clients.
RemoveFromClientObjectIds(object_id, client);
}
}

void PlasmaStore::SealObjects(const std::vector<ObjectID> &object_ids) {
Expand Down
1 change: 1 addition & 0 deletions src/ray/object_manager/plasma/store.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ class PlasmaStore {
ABSL_EXCLUSIVE_LOCKS_REQUIRED(mutex_);

/// Record the fact that a particular client is no longer using an object.
/// This function is idempotent thus can be called multiple times.
///
/// \param object_id The object ID of the object that is being released.
/// \param client The client making this request.
Expand Down

0 comments on commit 6cc3cda

Please sign in to comment.