Fix wrong ID type in prepare_checkpoint (#4124)

* Fix wrong ID type in prepare_checkpoint

* fix

* fix eq
This commit is contained in:
Hao Chen
2019-02-26 03:53:09 +08:00
committed by Stephanie Wang
parent 524e69a82d
commit 49dc85e54b
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -354,7 +354,7 @@ cdef class RayletClient:
cdef CActorCheckpointID checkpoint_id
check_status(self.client.get().PrepareActorCheckpoint(
actor_id.data, checkpoint_id))
return ObjectID.from_native(checkpoint_id)
return ActorCheckpointID.from_native(checkpoint_id)
def notify_actor_resumed_from_checkpoint(self, ActorID actor_id,
ActorCheckpointID checkpoint_id):
+2 -2
View File
@@ -74,7 +74,7 @@ cdef class UniqueID:
return self.data.is_nil()
def __eq__(self, other):
return self.binary() == other.binary()
return type(self) == type(other) and self.binary() == other.binary()
def __ne__(self, other):
return self.binary() != other.binary()
@@ -263,7 +263,7 @@ cdef class ActorCheckpointID(UniqueID):
@staticmethod
cdef from_native(const CActorCheckpointID& cpp_id):
cdef ActorCheckpointID self = ActorCheckpointID.__new__(ActorHandleID)
cdef ActorCheckpointID self = ActorCheckpointID.__new__(ActorCheckpointID)
self.data = cpp_id
return self