Skip to content

worker: add a plan setup wrapper - #23

Closed
geoffreyclaude wants to merge 1 commit into
leaf-sampler-dd-17-07-2026from
feat/worker-plan-setup-hook
Closed

worker: add a plan setup wrapper#23
geoffreyclaude wants to merge 1 commit into
leaf-sampler-dd-17-07-2026from
feat/worker-plan-setup-hook

Conversation

@geoffreyclaude

Copy link
Copy Markdown

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.

@geoffreyclaude

Copy link
Copy Markdown
Author

Closing at the host integration owner's request. Gate B will be implemented entirely in dd-source without changing datafusion-distributed.

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