[SPARK-58021][CONNECT] Warm local server pool members before use - #57688
Open
ericm-db wants to merge 6 commits into
Open
[SPARK-58021][CONNECT] Warm local server pool members before use#57688ericm-db wants to merge 6 commits into
ericm-db wants to merge 6 commits into
Conversation
Expose the per-user runtime directory and startup seed configuration, and let LocalConnectServer start isolated daemons with an ephemeral port and precomputed configuration. Keep persistent-server reuse on the same launch path and add focused unit coverage.
Co-authored-by: Isaac Claude-Session: https://claude.ai/code/session_011tpdLYqY4VRw4s1KjDb2fi
Co-authored-by: Isaac Claude-Session: https://claude.ai/code/session_011tpdLYqY4VRw4s1KjDb2fi
Co-authored-by: Isaac Claude-Session: https://claude.ai/code/session_011tpdLYqY4VRw4s1KjDb2fi
Co-authored-by: Isaac Claude-Session: https://claude.ai/code/session_011tpdLYqY4VRw4s1KjDb2fi
Co-authored-by: Isaac Claude-Session: https://claude.ai/code/session_011tpdLYqY4VRw4s1KjDb2fi
This was referenced Jul 31, 2026
uros-b
approved these changes
Jul 31, 2026
Member
|
Thank you @ericm-db! cc @HyukjinKwon |
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?
This is layer 6 of the local Connect pool stack: #57684 -> #57685 -> #57686 -> #57687 -> #57102 -> this PR. Until the lower layers merge, GitHub shows their cumulative diff; the new review unit here is commit
275235cd137.This layer adds optional JIT warmup for newly booted pool members:
SPARK_LOCAL_CONNECT_POOL_WARMUP=0disables it;--warmentry point runs the query set; andWhy are the changes needed?
A booted server avoids JVM and SparkContext startup, but its first real query can still pay JIT and code-generation costs. Keeping warmup separate from acquisition makes this optimization and its subprocess failure boundary optional and independently reviewable.
Does this PR introduce any user-facing change?
Yes, only for the experimental pool opt-in introduced by #57102. Pool members warm themselves by default before use. Set
SPARK_LOCAL_CONNECT_POOL_WARMUP=0to retain the booted-server behavior without synthetic queries. Behavior is unchanged when the pool opt-in is disabled.How was this patch tested?
Added focused tests for environment parsing, termination of a warmup child after a member is claimed, and execution plus cleanup of the fixed query set. The full pool suite also covers sequential and concurrent clients against real local Connect servers.
All 22 tests passed. Ruff check, Ruff format check, and
git diff --checkalso passed.Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Fable 5) and OpenAI Codex (GPT-5)