Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion taskvine/src/manager/vine_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -4153,6 +4153,8 @@ struct vine_manager *vine_ssl_create(int port, const char *key, const char *cert
q->sandbox_grow_factor = 2.0;
q->disk_proportion_available_to_task = 0.75;

q->return_recovery_tasks = 0;

q->stats = calloc(1, sizeof(struct vine_stats));
q->stats_measure = calloc(1, sizeof(struct vine_stats));

Expand Down Expand Up @@ -5232,7 +5234,11 @@ struct vine_task *find_task_to_return(struct vine_manager *q, const char *tag, i
return t;
break;
case VINE_TASK_TYPE_RECOVERY:
/* do nothing and let vine_manager_consider_recovery_task do its job */
/* if configured to return recovery tasks, return it to the user and let them take care of it. */
if (q->return_recovery_tasks) {
return t;
}
/* otherwise, do nothing and let vine_manager_consider_recovery_task do its job */
break;
case VINE_TASK_TYPE_LIBRARY_INSTANCE:
/* silently delete the task, since it was created by the manager.
Expand Down Expand Up @@ -5980,6 +5986,9 @@ int vine_tune(struct vine_manager *q, const char *name, double value)
} else if (!strcmp(name, "enforce-worker-eviction-interval")) {
q->enforce_worker_eviction_interval = (timestamp_t)(MAX(0, (int)value) * ONE_SECOND);

} else if (!strcmp(name, "return-recovery-tasks")) {
q->return_recovery_tasks = !!((int)value);

} else {
debug(D_NOTICE | D_VINE, "Warning: tuning parameter \"%s\" not recognized\n", name);
return -1;
Expand Down
1 change: 1 addition & 0 deletions taskvine/src/manager/vine_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ struct vine_manager {

double sandbox_grow_factor; /* When task disk sandboxes are exhausted, increase the allocation using their measured valued times this factor */
double disk_proportion_available_to_task; /* intentionally reduces disk allocation for tasks to reserve some space for cache growth. */
int return_recovery_tasks; /* If true, recovery tasks are returned by vine_wait to the user. By default 0 and they are handled internally. */

/* todo: confirm datatype. int or int64 */
int max_task_stdout_storage; /* Maximum size of standard output from task. (If larger, send to a separate file.) */
Expand Down
Loading