mirror of
https://github.com/wassname/ray.git
synced 2026-07-21 12:50:45 +08:00
Fix failure handling for actor death (#3359)
* Broadcast actor death, clean up dummy objects * Reduce logging and clean up state when failing a task * lint * Make actor failure test nicer, reduce node timeout
This commit is contained in:
+12
-5
@@ -1260,7 +1260,14 @@ def test_blocking_actor_task(shutdown_only):
|
||||
|
||||
|
||||
def test_exception_raised_when_actor_node_dies(shutdown_only):
|
||||
ray.worker._init(start_ray_local=True, num_local_schedulers=2, num_cpus=1)
|
||||
ray.worker._init(
|
||||
start_ray_local=True,
|
||||
num_local_schedulers=2,
|
||||
num_cpus=1,
|
||||
_internal_config=json.dumps({
|
||||
"initial_reconstruction_timeout_milliseconds": 200,
|
||||
"num_heartbeats_timeout": 10,
|
||||
}))
|
||||
|
||||
@ray.remote
|
||||
class Counter(object):
|
||||
@@ -1287,11 +1294,11 @@ def test_exception_raised_when_actor_node_dies(shutdown_only):
|
||||
ray.services.PROCESS_TYPE_PLASMA_STORE][1]
|
||||
process.kill()
|
||||
|
||||
# Submit some new actor tasks.
|
||||
x_ids = [actor.inc.remote() for _ in range(5)]
|
||||
|
||||
# Make sure that getting the result raises an exception.
|
||||
# Submit some new actor tasks both before and after the node failure is
|
||||
# detected. Make sure that getting the result raises an exception.
|
||||
for _ in range(10):
|
||||
# Submit some new actor tasks.
|
||||
x_ids = [actor.inc.remote() for _ in range(5)]
|
||||
for x_id in x_ids:
|
||||
with pytest.raises(ray.worker.RayGetError):
|
||||
# There is some small chance that ray.get will actually
|
||||
|
||||
@@ -3,6 +3,7 @@ from __future__ import division
|
||||
from __future__ import print_function
|
||||
|
||||
import os
|
||||
import json
|
||||
import signal
|
||||
import time
|
||||
|
||||
@@ -262,7 +263,11 @@ def _test_component_failed(component_type):
|
||||
num_local_schedulers=num_local_schedulers,
|
||||
start_ray_local=True,
|
||||
num_cpus=[num_workers_per_scheduler] * num_local_schedulers,
|
||||
redirect_output=True)
|
||||
redirect_output=True,
|
||||
_internal_config=json.dumps({
|
||||
"initial_reconstruction_timeout_milliseconds": 1000,
|
||||
"num_heartbeats_timeout": 10,
|
||||
}))
|
||||
|
||||
# Submit many tasks with many dependencies.
|
||||
@ray.remote
|
||||
|
||||
Reference in New Issue
Block a user