Skip to content

Commit

Permalink
vine: make immediate recovery to recover immediately (#4069)
Browse files Browse the repository at this point in the history
  • Loading branch information
btovar authored Feb 20, 2025
1 parent 2fc88bc commit 54aaae7
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions taskvine/src/manager/vine_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -901,6 +901,15 @@ static void cleanup_worker_files(struct vine_manager *q, struct vine_worker_info
replica = vine_file_replica_table_remove(q, w, cached_name);
if (replica) {
vine_file_replica_delete(replica);

// recreate tmps lost with this worker if needed
if (q->immediate_recovery) {
if (f && f->type == VINE_TEMP && f->state == VINE_FILE_STATE_CREATED) {
if (!vine_file_replica_table_exists_somewhere(q, f->cached_name)) {
vine_manager_consider_recovery_task(q, f, f->recovery_task);
}
}
}
}
}
}
Expand Down Expand Up @@ -930,11 +939,6 @@ static void cleanup_worker(struct vine_manager *q, struct vine_worker_info *w)
/* Remove the unfinished task and update data structures. */
reap_task_from_worker(q, w, t, VINE_TASK_READY);

// recreate inputs lost
if (q->immediate_recovery) {
vine_manager_check_inputs_available(q, t);
}

vine_task_clean(t);

itable_firstkey(w->current_tasks);
Expand Down

0 comments on commit 54aaae7

Please sign in to comment.