mirror of
https://github.com/wassname/ray.git
synced 2026-07-17 11:32:33 +08:00
Fix actor garbage collection by breaking cyclic references (#1064)
* Fix bug in wait_for_pid_to_exit, add test for actor deletion. * Fix actor garbage collection by breaking cyclic references * Add test for calling actor method immediately after actor creation. * Fix bug, must dispatch tasks when workers are killed. * Fix python test * Fix cyclic reference problem by creating ActorMethod objects on the fly. * Try simply increasing the time allowed for many_drivers_test.py.
This commit is contained in:
committed by
Robert Nishihara
parent
971becc905
commit
aebe9f9374
@@ -356,12 +356,6 @@ void handle_actor_worker_connect(LocalSchedulerState *state,
|
||||
dispatch_actor_task(state, algorithm_state, actor_id);
|
||||
}
|
||||
|
||||
void handle_actor_worker_disconnect(LocalSchedulerState *state,
|
||||
SchedulingAlgorithmState *algorithm_state,
|
||||
ActorID actor_id) {
|
||||
remove_actor(algorithm_state, actor_id);
|
||||
}
|
||||
|
||||
/**
|
||||
* This will add a task to the task queue for an actor. If this is the first
|
||||
* task being processed for this actor, it is possible that the LocalActorInfo
|
||||
@@ -1156,6 +1150,18 @@ void handle_worker_removed(LocalSchedulerState *state,
|
||||
|
||||
/* Make sure we removed the worker at most once. */
|
||||
CHECK(num_times_removed <= 1);
|
||||
|
||||
/* Attempt to dispatch some tasks because some resources may have freed up. */
|
||||
dispatch_all_tasks(state, algorithm_state);
|
||||
}
|
||||
|
||||
void handle_actor_worker_disconnect(LocalSchedulerState *state,
|
||||
SchedulingAlgorithmState *algorithm_state,
|
||||
ActorID actor_id) {
|
||||
remove_actor(algorithm_state, actor_id);
|
||||
|
||||
/* Attempt to dispatch some tasks because some resources may have freed up. */
|
||||
dispatch_all_tasks(state, algorithm_state);
|
||||
}
|
||||
|
||||
void handle_actor_worker_available(LocalSchedulerState *state,
|
||||
|
||||
Reference in New Issue
Block a user