Skip to content

Commit dbc8c52

Browse files
authored
[core] loosen the check on release object (#39570) (#39577)
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.
1 parent 53809dc commit dbc8c52

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/ray/object_manager/plasma/store.cc

+4-3
Original file line numberDiff line numberDiff line change
@@ -278,9 +278,10 @@ int PlasmaStore::RemoveFromClientObjectIds(const ObjectID &object_id,
278278
void PlasmaStore::ReleaseObject(const ObjectID &object_id,
279279
const std::shared_ptr<Client> &client) {
280280
auto entry = object_lifecycle_mgr_.GetObject(object_id);
281-
RAY_CHECK(entry != nullptr);
282-
// Remove the client from the object's array of clients.
283-
RAY_CHECK(RemoveFromClientObjectIds(object_id, client) == 1);
281+
if (entry != nullptr) {
282+
// Remove the client from the object's array of clients.
283+
RemoveFromClientObjectIds(object_id, client);
284+
}
284285
}
285286

286287
void PlasmaStore::SealObjects(const std::vector<ObjectID> &object_ids) {

src/ray/object_manager/plasma/store.h

+1
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ class PlasmaStore {
175175
ABSL_EXCLUSIVE_LOCKS_REQUIRED(mutex_);
176176

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

0 commit comments

Comments
 (0)