Skip to content

Commit

Permalink
vine: check the availability of staged inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
JinZhou5042 committed Nov 26, 2024
1 parent 8530039 commit 4e2f6fd
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions taskvine/src/manager/vine_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -3183,7 +3183,7 @@ static void vine_manager_create_recovery_tasks(struct vine_manager *q, struct vi

LIST_ITERATE(t->output_mounts, m)
{
if (m->file->type == VINE_TEMP) {
if (m->file->type == VINE_TEMP || m->file->type == VINE_FILE) {
if (!recovery_task) {
recovery_task = vine_task_copy(t);
recovery_task->type = VINE_TASK_TYPE_RECOVERY;
Expand Down Expand Up @@ -3253,8 +3253,14 @@ static int vine_manager_check_inputs_available(struct vine_manager *q, struct vi
LIST_ITERATE(t->input_mounts, m)
{
struct vine_file *f = m->file;
if (f->type == VINE_FILE && f->state == VINE_FILE_STATE_PENDING) {
all_available = 0;
if (f->type == VINE_FILE) {
if (f->state == VINE_FILE_STATE_PENDING) {
all_available = 0;
} else if (vine_file_has_changed(f)) {
/* this only happens if the input file is missing in the staging directory */
vine_manager_consider_recovery_task(q, f, f->recovery_task);
all_available = 0;
}
} else if (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

0 comments on commit 4e2f6fd

Please sign in to comment.