mirror of
https://github.com/wassname/ray.git
synced 2026-09-11 12:43:20 +08:00
Reconstruction for evicted objects (#181)
* First pass at reconstruction in the worker Modify reconstruction stress testing to start Plasma service before rest of Ray cluster TODO about reconstructing ray.puts Fix ray.put error for double creates Distinguish between empty entry and no entry in object table Fix test case Fix Python test Fix tests * Only call reconstruct on objects we have not yet received * Address review comments * Fix reconstruction for Python3 * remove unused code * Address Robert's comments, stress tests are crashing * Test and update the task's scheduling state to suppress duplicate reconstruction requests. * Split result table into two lookups, one for task ID and the other as a test-and-set for the task state * Fix object table tests * Fix redis module result_table_lookup test case * Multinode reconstruction tests * Fix python3 test case * rename * Use new start_redis * Remove unused code * lint * indent * Address Robert's comments * Use start_redis from ray.services in state table tests * Remove unnecessary memset
This commit is contained in:
committed by
Robert Nishihara
parent
f69d4aaaa7
commit
241b539ff8
@@ -31,12 +31,11 @@ void new_object_fail_callback(unique_id id,
|
||||
/* === Test adding an object with an associated task === */
|
||||
|
||||
void new_object_done_callback(object_id object_id,
|
||||
task *task,
|
||||
task_id task_id,
|
||||
void *user_context) {
|
||||
new_object_succeeded = 1;
|
||||
CHECK(object_ids_equal(object_id, new_object_id));
|
||||
CHECK(task);
|
||||
CHECK(memcmp(task, new_object_task, task_size(task)) == 0);
|
||||
CHECK(task_ids_equal(task_id, new_object_task_id));
|
||||
event_loop_stop(g_loop);
|
||||
}
|
||||
|
||||
@@ -92,26 +91,14 @@ TEST new_object_test(void) {
|
||||
|
||||
/* === Test adding an object without an associated task === */
|
||||
|
||||
void new_object_no_task_lookup_callback(object_id object_id,
|
||||
task *task,
|
||||
void *user_context) {
|
||||
void new_object_no_task_callback(object_id object_id,
|
||||
task_id task_id,
|
||||
void *user_context) {
|
||||
new_object_succeeded = 1;
|
||||
CHECK(task == NULL);
|
||||
CHECK(IS_NIL_ID(task_id));
|
||||
event_loop_stop(g_loop);
|
||||
}
|
||||
|
||||
void new_object_no_task_callback(object_id object_id, void *user_context) {
|
||||
CHECK(object_ids_equal(object_id, new_object_id));
|
||||
retry_info retry = {
|
||||
.num_retries = 5,
|
||||
.timeout = 100,
|
||||
.fail_callback = new_object_fail_callback,
|
||||
};
|
||||
db_handle *db = user_context;
|
||||
result_table_lookup(db, object_id, &retry, new_object_no_task_lookup_callback,
|
||||
NULL);
|
||||
}
|
||||
|
||||
TEST new_object_no_task_test(void) {
|
||||
new_object_failed = 0;
|
||||
new_object_succeeded = 0;
|
||||
@@ -126,8 +113,8 @@ TEST new_object_no_task_test(void) {
|
||||
.timeout = 100,
|
||||
.fail_callback = new_object_fail_callback,
|
||||
};
|
||||
result_table_add(db, new_object_id, new_object_task_id, &retry,
|
||||
new_object_no_task_callback, db);
|
||||
result_table_lookup(db, new_object_id, &retry, new_object_no_task_callback,
|
||||
NULL);
|
||||
event_loop_run(g_loop);
|
||||
db_disconnect(db);
|
||||
destroy_outstanding_callbacks(g_loop);
|
||||
|
||||
Reference in New Issue
Block a user