worker: add a plan setup wrapper - #23
Closed
geoffreyclaude wants to merge 1 commit into
Closed
Conversation
Author
|
Closing at the host integration owner's request. Gate B will be implemented entirely in dd-source without changing datafusion-distributed. |
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.
Problem\n\nA host can attach query ownership while building a worker session, but the material set-plan work happens later: physical-plan decoding, worker plan hooks, and the initial sampler kickoff currently have no common wrapper. That leaves integrations such as df-executor unable to activate their query CPU owner while this work runs.\n\n## Implementation\n\n- Add a default, object-safe WorkerSessionBuilder::run_plan_setup hook.\n- Run physical decode, all worker plan hooks, and first-sampler kickoff inside that hook.\n- Preserve the hook through MappedWorkerSessionBuilder.\n- Stop the wrapper before task publication and later execution, including dynamic producer-head work.\n- Document the extension point and its successful-callback contract.\n\nThe default implementation is behavior-preserving. No wire format, plan shape, scheduling boundary, or execution ordering changes.\n\n## Validation\n\nFocused unit tests prove default execution, callback-error propagation, and mapped-builder delegation. Worker integration tests prove a custom codec decode, both plan hooks, and real sampler kickoff observe the wrapper, and that wrapper errors reach the query. The integration-feature all-target check, clippy with warnings denied, rustdoc tests, formatting, and whitespace checks pass.\n\n## Documentation\n\nThe worker guide now explains which setup phases the hook covers and that mapped builders retain the wrapper.