Add entries to in-memory store on Put() (#7085)

This commit is contained in:
Edward Oakes
2020-03-04 10:17:27 -08:00
committed by GitHub
parent aa4861c2a0
commit 0abcca258f
19 changed files with 186 additions and 196 deletions
+9 -2
View File
@@ -270,8 +270,15 @@ class Worker:
"call 'put' on it (or return it).")
serialized_value = self.get_serialization_context().serialize(value)
return self.core_worker.put_serialized_object(
serialized_value, object_id=object_id, pin_object=pin_object)
# This *must* be the first place that we construct this python
# ObjectID because an entry with 0 local references is created when
# the object is Put() in the core worker, expecting that this python
# reference will be created. If another reference is created and
# removed before this one, it will corrupt the state in the
# reference counter.
return ray.ObjectID(
self.core_worker.put_serialized_object(
serialized_value, object_id=object_id, pin_object=pin_object))
def deserialize_objects(self, data_metadata_pairs, object_ids):
context = self.get_serialization_context()