Skip to content

refactor(transfer,engine): tear out dead parallel-receive-delta scaffolding (PIP-8) - #4731

Merged
oferchen merged 2 commits into
masterfrom
refactor/pip-8-tear-out-dead-parallel-receive-delta-scaffolding
May 22, 2026
Merged

oferchen merged 2 commits into
masterfrom
refactor/pip-8-tear-out-dead-parallel-receive-delta-scaffolding

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

PIP-7 (#4730) proved that the receiver-side parallel-receive-delta
dispatch was a side-effect-only no-op. ReceiverContext::delta_pipeline
had 1 writer (enable_parallel_receive_delta) and 0 readers - the
production receive loop never drained the swapped pipeline. The only
observable behaviour the feature flag enabled was the side effect of
constructing ParallelDeltaPipeline::new, which spawns a
DeltaConsumer background thread - the suspected source of the
file_1.txt corruption surfaced by the PIP-4 parallel-threshold-trip
interop scenario.

This PR tears out the dead receiver-side dispatch scaffolding so the
feature flag can no longer spawn an unobserved background thread that
the receiver never consumes.

What was deleted

  • ReceiverContext::enable_parallel_receive_delta
  • ReceiverContext::set_delta_pipeline
  • ReceiverContext::dispatch_receiver_strategy
  • ReceiverContext::select_receiver_strategy
  • ReceiverContext::total_source_bytes
  • ReceiverContext::dispatch_forced_parallel
  • The delta_pipeline: Option<Box<dyn ReceiverDeltaPipeline>> field
  • The ReceiverStrategy enum and
    TransferStats::receiver_strategy_chosen
  • PARALLEL_RECEIVE_FILE_COUNT_THRESHOLD,
    PARALLEL_RECEIVE_BYTES_THRESHOLD, FORCE_PARALLEL_RECEIVE_ENV
    constants
  • The strategy_tests module in receiver/mod.rs
  • crates/transfer/src/receiver/tests/file_list/receiver_strategy.rs
  • The dispatch_receiver_strategy() call sites in
    receiver/transfer/{sync,pipelined,pipelined_incremental}.rs

What was kept (no functional change)

  • ParallelDeltaApplier - benches drive it directly
    (parallel_receive_delta_perf,
    br_3j_f_dashmap_cores_vs_throughput, parallel_verify_chunk)
  • ParallelDeltaPipeline -
    wire_format_parallel_scheduling_fuzz exercises it; PIP-9 will need
    it as a substrate
  • DeltaConsumer - engine consumer tests +
    multi_producer_audit reference it
  • The parallel-receive-delta feature flag - now a no-op pending PIP-9

The OC_RSYNC_FORCE_PARALLEL env knob is silently a no-op now (the
env constant is gone; the variable is no longer read anywhere).

Docs

  • Add docs/design/pip-9-parallel-receive-delta-wire-up-2026-05-22.md
    (status: OPEN) to track the future RJN-3 fan-out integration of
    ParallelDeltaApplier through a real production reader.
  • Update the PIP-7 doc with a "Resolution: dead scaffolding removed in
    PIP-8" appendix; bump status from OPEN to
    MITIGATED-PENDING-PIP-9.
  • Update the deferral notes in
    parallel-receive-delta-default-on.md,
    pip-4-closure-2026-05-21.md, and
    br-6-sign-off-check-in-2026-05-21.md from "DEFERRED pending PIP-7
    fix" to "SUPERSEDED by PIP-7 + PIP-8".
  • Update README and CHANGELOG.

Test plan

  • CI fmt + clippy
  • CI nextest (stable) - removed receiver_strategy.rs tests must
    no longer compile; the strategy_tests in receiver/mod.rs are
    gone; transfer_stats_incremental_fields_exist and
    transfer_stats_has_incremental_fields updated to drop the
    receiver_strategy_chosen field
  • CI Windows, macOS, Linux musl
  • CI interop - sequential apply path unchanged; the
    parallel-receive-delta feature flag is now a no-op and
    parallel-threshold-trip already removed by PR fix(transfer,engine): revert parallel-receive-delta default-on (PIP-7 receiver corruption) #4725

…olding (PIP-8)

PIP-7 (#4730) proved that the receiver-side parallel-receive-delta
dispatch was a side-effect-only no-op. ReceiverContext::delta_pipeline
had 1 writer (enable_parallel_receive_delta) and 0 readers - the
production receive loop never drained the swapped pipeline. The only
observable behaviour the feature flag enabled was the side effect of
constructing ParallelDeltaPipeline::new, which spawns a DeltaConsumer
background thread - the suspected source of the file_1.txt corruption
PIP-4 surfaced.

Remove the dead scaffolding:

- ReceiverContext::enable_parallel_receive_delta
- ReceiverContext::set_delta_pipeline
- ReceiverContext::dispatch_receiver_strategy
- ReceiverContext::select_receiver_strategy
- ReceiverContext::total_source_bytes
- ReceiverContext::dispatch_forced_parallel
- The delta_pipeline: Option<Box<dyn ReceiverDeltaPipeline>> field
- The ReceiverStrategy enum and TransferStats::receiver_strategy_chosen
- PARALLEL_RECEIVE_FILE_COUNT_THRESHOLD, PARALLEL_RECEIVE_BYTES_THRESHOLD,
  FORCE_PARALLEL_RECEIVE_ENV constants
- strategy_tests module in receiver/mod.rs
- crates/transfer/src/receiver/tests/file_list/receiver_strategy.rs
- dispatch_receiver_strategy() call sites in receiver/transfer/
  {sync,pipelined,pipelined_incremental}.rs

Keep compiled (no functional change):

- ParallelDeltaApplier - benches drive it directly
  (parallel_receive_delta_perf, br_3j_f_dashmap_cores_vs_throughput,
  parallel_verify_chunk)
- ParallelDeltaPipeline - wire_format_parallel_scheduling_fuzz exercises
  it; PIP-9 will need it as a substrate
- DeltaConsumer - engine consumer tests + multi_producer_audit
- The parallel-receive-delta feature flag - now a no-op pending PIP-9

Add docs/design/pip-9-parallel-receive-delta-wire-up-2026-05-22.md
to track the future RJN-3 fan-out integration of ParallelDeltaApplier
through a production reader. Update README, CHANGELOG, and the
deferral notes in parallel-receive-delta-default-on.md,
pip-4-closure-2026-05-21.md, br-6-sign-off-check-in-2026-05-21.md,
and the PIP-7 doc itself (status: OPEN -> MITIGATED-PENDING-PIP-9).
SkipWhile<Components, _> has no as_path() method on stable Rust 1.88;
the previous skip_while-then-as_path call introduced in SEC-1.q (#4728)
slipped through that PR's CI but breaks fmt+clippy on every subsequent
master CI run. Switch to a manual Components::next() walk that consumes
the leading Prefix/RootDir/CurDir components, then calls as_path() on
the unwrapped Components iterator.
@oferchen
oferchen merged commit 60b45a4 into master May 22, 2026
64 of 65 checks passed
@oferchen
oferchen deleted the refactor/pip-8-tear-out-dead-parallel-receive-delta-scaffolding branch May 22, 2026 14:01
oferchen added a commit that referenced this pull request May 22, 2026
… (PIP-9) (#4735)

Documents the architecture, interop test plan, feature flag transition,
and sub-task punch list for routing the production receiver token loop
through ParallelDeltaApplier behind the existing parallel-receive-delta
feature flag. Follows the PIP-8 dead-scaffolding teardown (#4731) and
the PIP-7 corruption investigation (#4730). No code changes; the wire-up
itself lands across PIP-9.a through PIP-9.f.
oferchen added a commit that referenced this pull request Aug 24, 2026
…olding (PIP-8) (#4731)

* refactor(transfer,engine): tear out dead parallel-receive-delta scaffolding (PIP-8)

PIP-7 (#4730) proved that the receiver-side parallel-receive-delta
dispatch was a side-effect-only no-op. ReceiverContext::delta_pipeline
had 1 writer (enable_parallel_receive_delta) and 0 readers - the
production receive loop never drained the swapped pipeline. The only
observable behaviour the feature flag enabled was the side effect of
constructing ParallelDeltaPipeline::new, which spawns a DeltaConsumer
background thread - the suspected source of the file_1.txt corruption
PIP-4 surfaced.

Remove the dead scaffolding:

- ReceiverContext::enable_parallel_receive_delta
- ReceiverContext::set_delta_pipeline
- ReceiverContext::dispatch_receiver_strategy
- ReceiverContext::select_receiver_strategy
- ReceiverContext::total_source_bytes
- ReceiverContext::dispatch_forced_parallel
- The delta_pipeline: Option<Box<dyn ReceiverDeltaPipeline>> field
- The ReceiverStrategy enum and TransferStats::receiver_strategy_chosen
- PARALLEL_RECEIVE_FILE_COUNT_THRESHOLD, PARALLEL_RECEIVE_BYTES_THRESHOLD,
  FORCE_PARALLEL_RECEIVE_ENV constants
- strategy_tests module in receiver/mod.rs
- crates/transfer/src/receiver/tests/file_list/receiver_strategy.rs
- dispatch_receiver_strategy() call sites in receiver/transfer/
  {sync,pipelined,pipelined_incremental}.rs

Keep compiled (no functional change):

- ParallelDeltaApplier - benches drive it directly
  (parallel_receive_delta_perf, br_3j_f_dashmap_cores_vs_throughput,
  parallel_verify_chunk)
- ParallelDeltaPipeline - wire_format_parallel_scheduling_fuzz exercises
  it; PIP-9 will need it as a substrate
- DeltaConsumer - engine consumer tests + multi_producer_audit
- The parallel-receive-delta feature flag - now a no-op pending PIP-9

Add docs/design/pip-9-parallel-receive-delta-wire-up-2026-05-22.md
to track the future RJN-3 fan-out integration of ParallelDeltaApplier
through a production reader. Update README, CHANGELOG, and the
deferral notes in parallel-receive-delta-default-on.md,
pip-4-closure-2026-05-21.md, br-6-sign-off-check-in-2026-05-21.md,
and the PIP-7 doc itself (status: OPEN -> MITIGATED-PENDING-PIP-9).

* fix(engine): use Components::next() walk for plan_directory_to_relative

SkipWhile<Components, _> has no as_path() method on stable Rust 1.88;
the previous skip_while-then-as_path call introduced in SEC-1.q (#4728)
slipped through that PR's CI but breaks fmt+clippy on every subsequent
master CI run. Switch to a manual Components::next() walk that consumes
the leading Prefix/RootDir/CurDir components, then calls as_path() on
the unwrapped Components iterator.
oferchen added a commit that referenced this pull request Aug 24, 2026
… (PIP-9) (#4735)

Documents the architecture, interop test plan, feature flag transition,
and sub-task punch list for routing the production receiver token loop
through ParallelDeltaApplier behind the existing parallel-receive-delta
feature flag. Follows the PIP-8 dead-scaffolding teardown (#4731) and
the PIP-7 corruption investigation (#4730). No code changes; the wire-up
itself lands across PIP-9.a through PIP-9.f.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant