Notify driver when a worker dies while executing a task. (#419)

* Notify driver when a worker dies while executing a task.

* Fix linting.

* Don't push error when local scheduler is cleaning up.
This commit is contained in:
Robert Nishihara
2017-04-06 00:02:39 -07:00
committed by Philipp Moritz
parent 85b373a4be
commit fa363a5a3a
3 changed files with 35 additions and 2 deletions
+5 -2
View File
@@ -20,17 +20,20 @@ typedef enum {
OBJECT_HASH_MISMATCH_ERROR_INDEX = 0,
/** An object that was created through a ray.put is lost. */
PUT_RECONSTRUCTION_ERROR_INDEX,
/** A worker died or was killed while executing a task. */
WORKER_DIED_ERROR_INDEX,
/** The total number of error types. */
MAX_ERROR_INDEX
} error_index;
/** Information about the error to be displayed to the user. */
static const char *error_types[] = {"object_hash_mismatch",
"put_reconstruction"};
"put_reconstruction", "worker_died"};
static const char *error_messages[] = {
"A nondeterministic task was reexecuted.",
"An object created by ray.put was evicted and could not be reconstructed. "
"The driver may need to be restarted."};
"The driver may need to be restarted.",
"A worker died or was killed while executing a task."};
/**
* Push an error to the given Python driver.