Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vine: check the availability of staged inputs #3994

Merged
merged 10 commits into from
Dec 2, 2024
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 (f->state == VINE_FILE_STATE_CREATED && 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
Loading