apache / apache/datafusion

Create a pipeline/morsel scheduler

Open
#21,719 5 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Rust
Stars
9.3k
Forks
2.4k
Avg merge
3d 7h
Merged PRs (30d)
344

Description

### Is your feature request related to a problem or challenge?

Currently we execute the physical plan using mostly a Volcano model.

Scans also currently (mostly)is executed with local aggregation state as each partition is spawned on the tokio runtime (and we usually use the number of threads by default).

We don't control thread locality everywhere, as we spawn tasks for each partition, tokio is free to move/steal them which might increase cross-thread movement.

### Describe the solution you'd like

Implement a morsel/pipeline-driven scheduler:

https://github.com/apache/datafusion/pull/2226 implemented this before but was removed after some time, probably it didn't show enough traction at that time.

### Describe alternatives you've considered

Just keep/improve the current execution model and make it work better within the multi-threaded Tokio runtime.

### Additional context

[`tokiouring` ](https://docs.rs/tokio-uring/latest/tokio_uring/) seems like it could work very well together .

Contributor guide

Open the contributing guide

Research direction

Start by reading the current physical-plan execution path and the linked DataFusion PR #2226, then examine how scans spawn per-partition tasks on the Tokio runtime. The issue does not name files or tests or define acceptance criteria, so a contributor should first establish the scheduler's scope and validation criteria before implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
data-engineering, distributed-systems, performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.