apache / apache/datafusion-ballista

Scheduler graceful shutdown

Open
#565 0 comments 1 reaction 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*)

We currently have graceful shutdown for the Ballista executors. We should have a similar behavior for the scheduler.

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

When the scheduler process receives a SIGTERM (or the equivalent on non-Linux), it should initiate a graceful shutdown. This would consist of:

1. Stop accepting new jobs. If a new job is submitted return an error indicating the scheduler is shutting down.
2. Continue to accept job status requests
3. Do not shutdown until either
i. All active jobs on the scheduler are completed
ii. Some configured timeout (default 30s?) elapses

This could be extended in the future to try and "hand off" scheduling to other schedulers but that is not necessary for now.

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

We could do nothing

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

Contributor guide

Open the contributing guide

Research direction

Start by comparing the existing Ballista executor graceful-shutdown behavior with the scheduler's signal handling, job submission, and job status paths. Define tests for rejecting new jobs, continuing status requests, and waiting for active jobs or the configured timeout; done when SIGTERM triggers those behaviors.

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
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.