apache / apache/datafusion-ballista

Make task reset policy configurable

Open
#663 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Rust
Stars
2.1k
Forks
320
Avg merge
1d 22h
Merged PRs (30d)
66

Description

**Is your feature request related to a problem or challenge? Please describe what you are trying to do.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
(This section helps Arrow developers understand the context and *why* for this feature, in addition to the *what*)

Currently when an executor is lost we try and rollback the job and retry tasks (and possibly stages) to continue. In some cases this is not the desired behavior and it would be better to just let the job fail. For instance, in an interactive query system where a late result is just as bad as a failure, it would be better to fail fast than consume more cluster resources to re-compute results.

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

Scheduler should have a configurable policy:

```
enum TaskResetPolicy {
Fail,
Retry
}
```

If set to `Fail` then when an executor is lost we fail any jobs with tasks running on that executor (and try and cancel any running tasks for those jobs on other executors) instead of trying to reset stages.

We can combine this with the ideas outlined in https://github.com/apache/arrow-ballista/issues/655 to try and allow executors to finish tasks after receiving `SIGTERM` before cancelling everything to minimize disruption. For interactive query systems where individual tasks are generally short-lived, this might be a more appropriate behavior.

Initially this should be a scheduler global config, but in principle it could be set on a per-query basis in the future.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

Do nothing

**Additional context**
Add any other context or screenshots about the feature request here.

Contributor guide

Open the contributing guide

Research direction

Start at the Scheduler's executor-loss handling and trace how jobs, tasks, and stages are currently reset and retried. Identify the scheduler-global configuration entry point and the existing cancellation path. Done means a configurable Fail or Retry policy, with Fail terminating affected jobs and cancelling their other running tasks instead of resetting stages.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
distributed-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.