feat: wire ReceiverDeltaPipeline into receiver transfer context#3166
Merged
Conversation
Add a pluggable delta_pipeline field to ReceiverContext so callers can inject SequentialDeltaPipeline (default), ParallelDeltaPipeline, or ThresholdDeltaPipeline. The default remains sequential - no behavior change. This lays the plumbing for opting into parallel delta dispatch. - Add `delta_pipeline: Option<Box<dyn ReceiverDeltaPipeline>>` field - Initialize with SequentialDeltaPipeline::new() in ReceiverContext::new() - Add set_delta_pipeline() public setter and take_delta_pipeline() internal accessor - Add Debug supertrait to ReceiverDeltaPipeline and impls for all types - Re-exports already present in lib.rs from prior PR
…par_iter The ReceiverDeltaPipeline trait object (containing mpsc::Receiver which is not Sync) made ReceiverContext not Sync, breaking rayon's par_iter closure which captures &self. Extract the individual basis config fields into local variables so the closure only captures those Sync values.
oferchen
added a commit
that referenced
this pull request
May 1, 2026
* feat: wire ReceiverDeltaPipeline into receiver transfer context Add a pluggable delta_pipeline field to ReceiverContext so callers can inject SequentialDeltaPipeline (default), ParallelDeltaPipeline, or ThresholdDeltaPipeline. The default remains sequential - no behavior change. This lays the plumbing for opting into parallel delta dispatch. - Add `delta_pipeline: Option<Box<dyn ReceiverDeltaPipeline>>` field - Initialize with SequentialDeltaPipeline::new() in ReceiverContext::new() - Add set_delta_pipeline() public setter and take_delta_pipeline() internal accessor - Add Debug supertrait to ReceiverDeltaPipeline and impls for all types - Re-exports already present in lib.rs from prior PR * fix: extract basis config fields to avoid capturing non-Sync self in par_iter The ReceiverDeltaPipeline trait object (containing mpsc::Receiver which is not Sync) made ReceiverContext not Sync, breaking rayon's par_iter closure which captures &self. Extract the individual basis config fields into local variables so the closure only captures those Sync values.
oferchen
added a commit
that referenced
this pull request
May 5, 2026
* feat: wire ReceiverDeltaPipeline into receiver transfer context Add a pluggable delta_pipeline field to ReceiverContext so callers can inject SequentialDeltaPipeline (default), ParallelDeltaPipeline, or ThresholdDeltaPipeline. The default remains sequential - no behavior change. This lays the plumbing for opting into parallel delta dispatch. - Add `delta_pipeline: Option<Box<dyn ReceiverDeltaPipeline>>` field - Initialize with SequentialDeltaPipeline::new() in ReceiverContext::new() - Add set_delta_pipeline() public setter and take_delta_pipeline() internal accessor - Add Debug supertrait to ReceiverDeltaPipeline and impls for all types - Re-exports already present in lib.rs from prior PR * fix: extract basis config fields to avoid capturing non-Sync self in par_iter The ReceiverDeltaPipeline trait object (containing mpsc::Receiver which is not Sync) made ReceiverContext not Sync, breaking rayon's par_iter closure which captures &self. Extract the individual basis config fields into local variables so the closure only captures those Sync values.
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.
Summary
delta_pipelinefield (Option<Box<dyn ReceiverDeltaPipeline>>) toReceiverContext, defaulting toSequentialDeltaPipeline(no behavior change)set_delta_pipeline()public setter for callers to injectThresholdDeltaPipelineorParallelDeltaPipelinetake_delta_pipeline()internal accessor for the transfer loop to consume the pipelineDebugsupertrait toReceiverDeltaPipelineand manualDebugimpls forParallelDeltaPipelineandThresholdDeltaPipelineAll existing call sites (
ReceiverContext::new) automatically get the sequential default. No wire format or protocol changes.Closes #1544
Test plan