[direct task] For serialized object IDs, check with owner before declaring object unreconstructable (#6286)

* Track borrowed vs owned objects

* Serialize owner address with object ID

* serialize owner task id

* Deserialize object IDs

* Pass direct task ID instead of plasma ID

* it works

* Fix ref count test

* Add unit test

* update warning

* we own ray.put objects

* missing file

* doc

* Fix unit test

* comments

* Fix py2

* lint

* update
This commit is contained in:
Stephanie Wang
2019-11-27 15:31:44 -08:00
committed by GitHub
parent 77b5098e7d
commit 2797c11b69
18 changed files with 594 additions and 131 deletions
+4
View File
@@ -132,6 +132,10 @@ cdef extern from "ray/protobuf/common.pb.h" nogil:
pass
cdef cppclass CTaskType "ray::TaskType":
pass
cdef cppclass CAddress "ray::rpc::Address":
CAddress()
const c_string &SerializeAsString()
void ParseFromString(const c_string &serialized)
# This is a workaround for C++ enum class since Cython has no corresponding
+7
View File
@@ -17,6 +17,7 @@ from ray.includes.unique_ids cimport (
CObjectID,
)
from ray.includes.common cimport (
CAddress,
CActorCreationOptions,
CBuffer,
CRayFunction,
@@ -116,6 +117,12 @@ cdef extern from "ray/core_worker/core_worker.h" nogil:
void AddObjectIDReference(const CObjectID &object_id)
void RemoveObjectIDReference(const CObjectID &object_id)
void PromoteObjectToPlasma(const CObjectID &object_id)
void PromoteToPlasmaAndGetOwnershipInfo(const CObjectID &object_id,
CTaskID *owner_id,
CAddress *owner_address)
void RegisterOwnershipInfoAndResolveFuture(
const CObjectID &object_id, const CTaskID &owner_id, const
CAddress &owner_address)
CRayStatus SetClientOptions(c_string client_name, int64_t limit)
CRayStatus Put(const CRayObject &object, CObjectID *object_id)
-1
View File
@@ -27,7 +27,6 @@ cdef extern from "ray/protobuf/common.pb.h" nogil:
cdef cppclass RpcTask "ray::rpc::Task":
RpcTaskSpec *mutable_task_spec()
cdef extern from "ray/protobuf/gcs.pb.h" nogil:
cdef cppclass TaskTableData "ray::rpc::TaskTableData":
RpcTask *mutable_task()