mirror of
https://github.com/wassname/ray.git
synced 2026-06-29 14:23:38 +08:00
Add a flag to disable reconstruction for a killed actor (#7346)
This commit is contained in:
@@ -859,13 +859,13 @@ cdef class CoreWorker:
|
||||
|
||||
return VectorToObjectIDs(return_ids)
|
||||
|
||||
def kill_actor(self, ActorID actor_id):
|
||||
def kill_actor(self, ActorID actor_id, c_bool no_reconstruction):
|
||||
cdef:
|
||||
CActorID c_actor_id = actor_id.native()
|
||||
|
||||
with nogil:
|
||||
check_status(self.core_worker.get().KillActor(
|
||||
c_actor_id, True))
|
||||
c_actor_id, True, no_reconstruction))
|
||||
|
||||
def resource_ids(self):
|
||||
cdef:
|
||||
|
||||
@@ -116,7 +116,9 @@ cdef extern from "ray/core_worker/core_worker.h" nogil:
|
||||
const CActorID &actor_id, const CRayFunction &function,
|
||||
const c_vector[CTaskArg] &args, const CTaskOptions &options,
|
||||
c_vector[CObjectID] *return_ids)
|
||||
CRayStatus KillActor(const CActorID &actor_id, c_bool force_kill)
|
||||
CRayStatus KillActor(
|
||||
const CActorID &actor_id, c_bool force_kill,
|
||||
c_bool no_reconstruction)
|
||||
|
||||
unique_ptr[CProfileEvent] CreateProfileEvent(
|
||||
const c_string &event_type)
|
||||
|
||||
@@ -1643,7 +1643,7 @@ def kill(actor):
|
||||
"Got: {}.".format(type(actor)))
|
||||
|
||||
worker = ray.worker.get_global_worker()
|
||||
worker.core_worker.kill_actor(actor._ray_actor_id)
|
||||
worker.core_worker.kill_actor(actor._ray_actor_id, False)
|
||||
|
||||
|
||||
def _mode(worker=global_worker):
|
||||
|
||||
Reference in New Issue
Block a user