Skip to content

[SPARK-52428] Add configurable gRPC connection and request timeouts#28

Open
rafafrdz wants to merge 1 commit intoapache:masterfrom
rafafrdz:add-grpc-timeout-configuration
Open

[SPARK-52428] Add configurable gRPC connection and request timeouts#28
rafafrdz wants to merge 1 commit intoapache:masterfrom
rafafrdz:add-grpc-timeout-configuration

Conversation

@rafafrdz
Copy link
Copy Markdown

Summary

  • Add connect_timeout and request_timeout fields to ChannelBuilder
  • Add connect_timeout(Duration) and request_timeout(Duration) builder methods to SparkSessionBuilder
  • Apply timeouts to the tonic Endpoint before connecting

Previously, Channel::connect() had no timeout, meaning hung connections could block indefinitely. Now users can configure:

let spark = SparkSessionBuilder::remote("sc://host:15002")
    .connect_timeout(Duration::from_secs(10))
    .request_timeout(Duration::from_secs(30))
    .build()
    .await?;

Test plan

  • cargo build passes
  • cargo test unit tests pass
  • cargo fmt -- --check passes

@rafafrdz rafafrdz force-pushed the add-grpc-timeout-configuration branch from ee2be21 to d4aae82 Compare March 29, 2026 08:08
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.

1 participant