Skip to content

Commit 54aaae7

Browse files
authored
vine: make immediate recovery to recover immediately (#4069)
1 parent 2fc88bc commit 54aaae7

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

taskvine/src/manager/vine_manager.c

+9-5
Original file line numberDiff line numberDiff line change
@@ -901,6 +901,15 @@ static void cleanup_worker_files(struct vine_manager *q, struct vine_worker_info
901901
replica = vine_file_replica_table_remove(q, w, cached_name);
902902
if (replica) {
903903
vine_file_replica_delete(replica);
904+
905+
// recreate tmps lost with this worker if needed
906+
if (q->immediate_recovery) {
907+
if (f && f->type == VINE_TEMP && f->state == VINE_FILE_STATE_CREATED) {
908+
if (!vine_file_replica_table_exists_somewhere(q, f->cached_name)) {
909+
vine_manager_consider_recovery_task(q, f, f->recovery_task);
910+
}
911+
}
912+
}
904913
}
905914
}
906915
}
@@ -930,11 +939,6 @@ static void cleanup_worker(struct vine_manager *q, struct vine_worker_info *w)
930939
/* Remove the unfinished task and update data structures. */
931940
reap_task_from_worker(q, w, t, VINE_TASK_READY);
932941

933-
// recreate inputs lost
934-
if (q->immediate_recovery) {
935-
vine_manager_check_inputs_available(q, t);
936-
}
937-
938942
vine_task_clean(t);
939943

940944
itable_firstkey(w->current_tasks);

0 commit comments

Comments
 (0)