Skip to content

Conversation

@danielhumanmod
Copy link
Contributor

@danielhumanmod danielhumanmod commented Jan 30, 2026

Which issue does this PR close?

Closes #1344 , as the Step 1 - Building the job-level dependency logic.

For the next step, we will apply EXPLAIN ANALYZE job as the first use case.

Rationale for this change

Ballista currently treats a single job as the atomic unit of scheduling, with no mechanism to run multiple jobs sequentially.

To support features like EXPLAIN ANALYZE, we need job-level dependencies. This PR allows the scheduler to split complex plans into dependent jobs, ensuring downstream jobs only trigger after upstream dependencies successfully complete and provide necessary metrics/state.

What changes are included in this PR?

This PR introduces a new ·Pending· status and a dependency resolution mechanism within the TaskManager.

Job submission flow

  1. Client file exeute_query GRPC request
  2. Split jobs into multiple jobs
  3. Submit upstream job into queued_jobs queue
  4. Submit downstream job into pending_jobs queue
  5. On upstream job completion, solve dependency, queue downstream jobs if all dependencies completed
  6. Execute downstream job
image (Green components are the new added ones)

Job lookup flow

image

Are there any user-facing changes?

No

@danielhumanmod danielhumanmod changed the title [WIP] feat: Support Job-Level Dependency with Async Job Activation feat: Support Job-Level Dependency with Async Job Activation Jan 31, 2026
@danielhumanmod danielhumanmod marked this pull request as ready for review January 31, 2026 06:40
@danielhumanmod
Copy link
Contributor Author

To make the review easier, I have not commit the new added tests, will do later.

Copy link
Contributor

@milenkovicm milenkovicm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool add-on, thanks @danielhumanmod

i just had a quick look, will try to review it asap. One question could we avoid job splitting registry and do splitting in custom query planner if needed ?

/// Registry for job split rules
///
/// Manages a collection of rules and provides methods to apply them to plans.
#[derive(Clone)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need plan JobSplitRegistry? can this be done as part of custom query planner ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support EXPLAIN ANALYZE in Ballista

2 participants