feat: bump default gRPC max message size 16 MiB -> 128 MiB - #2173
Open
andygrove wants to merge 5 commits into
Open
feat: bump default gRPC max message size 16 MiB -> 128 MiB#2173andygrove wants to merge 5 commits into
andygrove wants to merge 5 commits into
Conversation
At SF1000, some TPC-H plans (Q11, Q21, Q22) encode above the 16 MiB
default gRPC message-size ceiling, so submitting them fails with:
Status { code: OutOfRange, message: "Error, decoded message length
too large: found ~22 MB, the limit is: 16777216 bytes" }
Raising the runtime flags on scheduler and executor pods only lifts the
server-side receive limits. Several paths still use
`GrpcClientConfig::default()` (16 MiB) unconditionally — most notably
the scheduler-to-executor client in `ExecutorManager::new` — so
task-assignment RPCs with large plans reject even when the servers were
raised.
Bump every default that fed a 16 MiB ceiling to 128 MiB:
- ballista/core/src/config.rs — `BALLISTA_CLIENT_GRPC_MAX_MESSAGE_SIZE`
default (SessionConfig-driven client path).
- ballista/core/src/utils.rs — `GrpcClientConfig::default()`
`max_message_size` (used by scheduler-to-executor, flight proxy,
executor client pool default lookups).
- ballista/scheduler/src/config.rs and
ballista/executor/src/config.rs — both CLI flags
(`--grpc-server-max-{decoding,encoding}-message-size`) and the
matching struct defaults.
- ballista/executor/src/executor_process.rs — matching
ExecutorProcessConfig defaults.
The value is a ceiling, not a preallocation, so bumping it has no
runtime cost for messages below the old limit.
Adds a round-trip test confirming that
`ballista.client.grpc_max_message_size` set on a SessionConfig reaches
`BallistaConfig::grpc_client_max_message_size()` unchanged, since that
path (options.set -> ExtensionOptions -> get_usize_setting) had no
existing coverage.
Updates the `default_config` unit test to reflect the new default.
Signed-off-by: Andy Grove <agrove@apache.org>
Signed-off-by: Andy Grove <agrove@apache.org>
Bumping GrpcClientConfig::default().max_message_size to 128 MiB helps most cases but leaves no runtime knob for the scheduler's outbound gRPC client to executors — the client the task-assignment RPC actually flows through. Its config was only overridable via a Rust-side `override_config_producer`, which end users of the shipped binary can't set. Add `--grpc-client-max-message-size` on the scheduler CLI (default 134217728 == the new default), and use it to override `GrpcClientConfig::max_message_size` in `ExecutorManager::new` when no `override_config_producer` is wired. The producer path still takes precedence so embedders keep full control. Users can now scale beyond 128 MiB without recompiling. Signed-off-by: Andy Grove <agrove@apache.org>
Contributor
|
There is also outstanding pr which helps reducing message size #1853 |
phillipleblanc
approved these changes
Jul 27, 2026
phillipleblanc
left a comment
Contributor
There was a problem hiding this comment.
Looks good to me, one thing to check is whether we want to wire this into create_grpc_client_endpoint to pass along the max message size value.
i.e.
SchedulerConfig.grpc_client_max_message_size
v
GrpcClientConfig.max_message_size
v
create_grpc_client_endpoint(config) // here
v
ExecutorGrpcClient::new(channel)
create_grpc_client_endpoint reads settings such as:
- connection timeout
- keepalive interval
- HTTP/2 window sizes
But it never reads config.max_message_size. Message-size limits are Tonic codec settings, not HTTP/2 Endpoint settings.
It would need something like:
let client = ExecutorGrpcClient::new(connection)
.max_encoding_message_size(grpc_client_config.max_message_size)
.max_decoding_message_size(grpc_client_config.max_message_size);
martin-g
approved these changes
Jul 27, 2026
Co-authored-by: Martin Grigorov <martin-g@users.noreply.github.com>
Co-authored-by: Martin Grigorov <martin-g@users.noreply.github.com>
Member
|
I wonder whether 128MiB is too much ?! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
At SF1000 several TPC-H plans (Q11, Q21, Q22) encode above the 16 MiB default gRPC message-size ceiling and fail with:
Raising the runtime flags on scheduler/executor pods (
--grpc-server-max-*-message-size=...) only lifts the server-side receive limits. Several paths still useGrpcClientConfig::default()(16 MiB) unconditionally — most notably the scheduler-to-executor gRPC client inExecutorManager::new:https://github.com/apache/datafusion-ballista/blob/main/ballista/scheduler/src/state/executor_manager.rs#L88
So task-assignment RPCs with large plans reject even when the servers have been raised, unless the user knows to also configure a config-producer override. Same story in
flight_proxy_service.rsand the executor's client poolDefaultlookups.This PR bumps every default that fed a 16 MiB ceiling to 128 MiB.
Context: I hit this in #2168 while running SF1000 TPC-H and got stuck for a while before realizing the scheduler-side flags don't cover this path.
What changed
ballista/core/src/config.rs—BALLISTA_CLIENT_GRPC_MAX_MESSAGE_SIZEdefault (the SessionConfig-driven client path used bydistributed_query).ballista/core/src/utils.rs—GrpcClientConfig::default()max_message_size(used by scheduler-to-executor, flight proxy, executor client pool default lookups).ballista/scheduler/src/config.rsandballista/executor/src/config.rs— both CLI flags (--grpc-server-max-{decoding,encoding}-message-size) and the matching struct defaults.ballista/executor/src/executor_process.rs— matchingExecutorProcessConfigdefaults.The value is a ceiling, not a preallocation, so bumping it has no runtime cost for messages below the old limit.
New test
Adds a round-trip test that
ballista.client.grpc_max_message_size, set on aSessionConfigviaoptions_mut().set(...), reachesBallistaConfig::grpc_client_max_message_size()unchanged. That path (options.set → ExtensionOptions → get_usize_setting) had no existing coverage, and it's the one Python clients rely on via theircluster_configoverrides.Test plan
cargo test --workspace --lib— all green (all pre-existing suites + 2 new/updated).cargo fmt --all.cargo clippy --workspace --all-targets -- -D warningsclean.