mirror of
https://github.com/wassname/ray.git
synced 2026-09-09 11:32:43 +08:00
Inline small objects in GetObjectStatus response. (#13309)
This commit is contained in:
@@ -898,16 +898,17 @@ cdef class CoreWorker:
|
||||
|
||||
return RayObjectsToDataMetadataPairs(results)
|
||||
|
||||
def object_exists(self, ObjectRef object_ref):
|
||||
def object_exists(self, ObjectRef object_ref, memory_store_only=False):
|
||||
cdef:
|
||||
c_bool has_object
|
||||
c_bool is_in_plasma
|
||||
CObjectID c_object_id = object_ref.native()
|
||||
|
||||
with nogil:
|
||||
check_status(CCoreWorkerProcess.GetCoreWorker().Contains(
|
||||
c_object_id, &has_object))
|
||||
c_object_id, &has_object, &is_in_plasma))
|
||||
|
||||
return has_object
|
||||
return has_object and (not memory_store_only or not is_in_plasma)
|
||||
|
||||
cdef _create_put_buffer(self, shared_ptr[CBuffer] &metadata,
|
||||
size_t data_size, ObjectRef object_ref,
|
||||
|
||||
Reference in New Issue
Block a user