Skip to content

perf: prune irrelevant partitions task#1911

Open
coderfender wants to merge 11 commits into
apache:mainfrom
coderfender:prune_irrelavent_task_metadata
Open

perf: prune irrelevant partitions task#1911
coderfender wants to merge 11 commits into
apache:mainfrom
coderfender:prune_irrelavent_task_metadata

Conversation

@coderfender

@coderfender coderfender commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Closes #1880

Rationale for this change

What changes are included in this PR?

The current version in ballista sends out all partition information to every task on the executor. This becomes a bottleneck when the total partitions are high essentially reaching gRPC limit causing scale issues

The changes essentially eliminate redundant partition information being sent to the tasks. This is achieved by walking the plan and pruning partition id the task would be working on. There are special edge cases where a task works on more than ine partition (broadcast / coalesce) which are handled in the code

Added some unit tests as well

Are there any user-facing changes?

No

No

@coderfender coderfender requested a review from milenkovicm June 28, 2026 07:41
Comment thread ballista/scheduler/src/state/task_manager.rs Outdated
@andygrove

Copy link
Copy Markdown
Member

Thanks @coderfender. Could you fill out the PR description

Co-authored-by: Andy Grove <agrove@apache.org>
Comment thread ballista/scheduler/src/state/task_manager.rs
Comment thread ballista/scheduler/src/state/task_manager.rs
Comment thread ballista/scheduler/src/state/task_manager.rs

@andygrove andygrove left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for tackling this, the gRPC size ceiling at high partition counts is a real scaling limit and pruning per-task locations is a nice way to attack it. I left a few questions, mainly about the partition-alignment invariant and getting the Clippy build green. I skipped benchmarking since the change is off by default and the win is serialized-plan size rather than query time, which TPC-H at normal partition counts would not show.

This review was prepared with the help of an LLM.

Comment thread ballista/scheduler/src/state/task_manager.rs Outdated
Comment thread ballista/scheduler/src/state/task_manager.rs
Comment thread ballista/scheduler/src/state/task_manager.rs
@coderfender coderfender requested a review from andygrove July 5, 2026 19:31
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.

Improve stage encoding size by removing unrelated partition location

3 participants