[SPARK-58773] Add scg-routing crate - #3
Closed
viirya wants to merge 1 commit into
Closed
Conversation
Part of importing the Spark Connect Gateway reference implementation into apache/spark-connect-gateway as a series of small, bottom-up PRs. This adds the scg-routing crate — the routing core of the gateway. It defines the central traits and types that the pool and store layers implement and that the proxy routes through: SessionKey, the Pool trait (implemented later by pool-static / pool-k8s), the AffinityStore trait (implemented later by store-memory / store-redis), and the Router that ties them together. scg-routing is a leaf crate (no internal dependencies), so it compiles and tests on its own. It is appended to the workspace members list. Subsequent PRs add the crates that depend on it. Co-authored-by: Claude Code
HyukjinKwon
approved these changes
Aug 18, 2026
dongjoon-hyun
approved these changes
Aug 18, 2026
Member
Author
|
Thank you @HyukjinKwon @dongjoon-hyun ! |
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.
What changes were proposed in this pull request?
Part of importing the Spark Connect Gateway reference implementation into
apache/spark-connect-gatewayas a series of small, bottom-up PRs (tracked inthe do-not-merge reference PR #1).
This adds the
scg-routingcrate — the routing core of the gateway. It definesthe central traits and types that the pool and store layers implement and that
the proxy routes through:
SessionKey— the routing key derived from a requestPool— the backend-pool trait (implemented later by pool-static / pool-k8s)AffinityStore— the session-affinity store trait (implemented later bystore-memory / store-redis)
Router— ties them togetherscg-routingis a leaf crate (no internal dependencies), so it compiles andtests on its own. It is appended to the workspace
memberslist. SubsequentPRs add the crates that depend on it.
Why are the changes needed?
Implements the reference gateway from the approved SPIP (SPARK-58455), imported
one reviewable piece at a time.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
cargo fmt --all --check,cargo clippy --workspace --all-targets -- -D warnings,cargo build --workspace, andcargo test --workspaceall pass locally(scg-routing has 15 unit tests).
Was this patch authored or co-authored using generative AI tooling?
Yes, co-authored with Claude Code.