Skip to content

docs(design): PIP-7 reproduction + suspected location for parallel-receive-delta corruption - #4730

Merged
oferchen merged 1 commit into
masterfrom
docs/pip-7-investigation
May 22, 2026
Merged

oferchen merged 1 commit into
masterfrom
docs/pip-7-investigation

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

  • Documents the PIP-7 investigation findings inside the rsync-profile
    podman container build with --features parallel-receive-delta.
  • Container reproduction did NOT trigger the file_1.txt corruption
    across six repro shapes (initial copy / delta apply / comprehensive
    fixtures / OC_RSYNC_FORCE_PARALLEL / 10-run stress loop / oc-pull
    direction).
  • Static read of crates/engine/src/concurrent_delta/parallel_apply.rs,
    crates/transfer/src/delta_pipeline/parallel.rs, and
    crates/transfer/src/receiver/mod.rs shows the
    ParallelDeltaApplier/ParallelDeltaPipeline surfaces have no
    production callers
    in the receiver hot loop (matches the standing
    MEMORY.md note project_parallel_interop_parity_gap.md). The
    suspected location therefore moves from the applier internals to the
    pipeline-construction side effect inside
    ReceiverContext::enable_parallel_receive_delta at
    crates/transfer/src/receiver/mod.rs:418-422.
  • The fix sketch is to drop or instrument the dead state before
    re-promoting the feature, bisect under the dist profile (CI
    reproduces, release profile in the container does not), and re-add
    parallel-threshold-trip behind an opt-in env gate.

Test plan

  • Investigation only - no code changes; the PIP-7 fix itself is a
    follow-up and is explicitly out of scope here.
  • Confirm CI on this PR shows only doc-touching workflows running.

…ceive-delta corruption

Captures investigation results inside the rsync-profile container build
with --features parallel-receive-delta. The corruption did not reproduce
in the container across six repro shapes (initial / delta / comprehensive
fixtures / OC_RSYNC_FORCE_PARALLEL / stress loop / oc pull direction),
which combined with a fresh code read of crates/transfer/src/receiver/mod.rs,
crates/transfer/src/delta_pipeline/parallel.rs, and
crates/engine/src/concurrent_delta/parallel_apply.rs shows the
ParallelDeltaPipeline / ParallelDeltaApplier path is never consumed by
the production receive loop. The suspected location moves from the
applier itself to the pipeline-construction side effect inside
ReceiverContext::enable_parallel_receive_delta, with a fix sketch that
removes or instruments the dead state before re-promoting the feature.
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label May 22, 2026
@oferchen
oferchen merged commit 5750f4c into master May 22, 2026
10 checks passed
oferchen added a commit that referenced this pull request May 22, 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
oferchen deleted the docs/pip-7-investigation branch May 22, 2026 14:33
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
…ceive-delta corruption (#4730)

Captures investigation results inside the rsync-profile container build
with --features parallel-receive-delta. The corruption did not reproduce
in the container across six repro shapes (initial / delta / comprehensive
fixtures / OC_RSYNC_FORCE_PARALLEL / stress loop / oc pull direction),
which combined with a fresh code read of crates/transfer/src/receiver/mod.rs,
crates/transfer/src/delta_pipeline/parallel.rs, and
crates/engine/src/concurrent_delta/parallel_apply.rs shows the
ParallelDeltaPipeline / ParallelDeltaApplier path is never consumed by
the production receive loop. The suspected location moves from the
applier itself to the pipeline-construction side effect inside
ReceiverContext::enable_parallel_receive_delta, with a fix sketch that
removes or instruments the dead state before re-promoting the feature.
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

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant