Repository navigation
feat(transfer): force-parallel env override + interop scenario crossing parallel threshold (PIP-4) - #4720
Merged
Conversation
…ng parallel threshold (PIP-4) Validates the parallel-receive-delta dispatch path through two complementary mechanisms (PIP-4 / #2567): Runtime override (Part A): `OC_RSYNC_FORCE_PARALLEL=<non-empty>` now short-circuits `ReceiverContext::dispatch_receiver_strategy` and unconditionally selects `ReceiverStrategy::Parallel`, enabling ad-hoc debugging of the parallel apply path without crossing the file-count / total-bytes thresholds. When the `parallel-receive-delta` feature is compiled out, the override logs `parallel_unavailable` under GENR and falls back to Sequential so telemetry never claims a path the binary cannot take. The toggle is intentionally not surfaced on the CLI. Interop coverage (Part B): adds the `parallel-threshold-trip` scenario to the comprehensive interop matrix. The scenario augments the source tree with 120 tiny files (well above `PARALLEL_RECEIVE_FILE_COUNT_THRESHOLD` = 100, well under the 64 MiB byte cutoff and tiny in absolute size so CI time stays low) and validates a byte-identical destination. The new scenario gives the parallel path permanent CI coverage that the existing ~260 KB / 19-file comprehensive payload never exercised. Unit tests use the shared `platform::env::EnvGuard` fixture with a module-local mutex to serialise every test that touches the env var.
oferchen
force-pushed
the
feat/pip-4-force-parallel-and-interop-scenario
branch
from
May 22, 2026 07:30
c8ebce6 to
4ac67ac
Compare
Merged
4 tasks
oferchen
added a commit
that referenced
this pull request
May 22, 2026
… receiver corruption) (#4725) PIP-4 (#4720) added the `parallel-threshold-trip` interop scenario that crosses `PARALLEL_RECEIVE_FILE_COUNT_THRESHOLD = 100` and exposed a real corruption bug: the receiver writes wrong bytes for the first dispatched file (`parallel_threshold/file_1.txt`) whenever a transfer trips the parallel-receive-delta dispatch path. The bug reproduces on stock `cargo build --release` because PIP-5 (#4666) flipped the feature into the default set across the workspace. This PR ships the immediate mitigation so default builds are safe again while PIP-7 investigates the receiver-side corruption: 1. Remove `parallel-receive-delta` from `default = [...]` in the workspace `Cargo.toml`, `crates/transfer/Cargo.toml`, and `crates/engine/Cargo.toml`. The feature stays defined and remains opt-in via `--features parallel-receive-delta` for testing. 2. Remove the `parallel-threshold-trip` matrix entry from `tools/ci/run_interop.sh` along with its setup, cleanup, and verify branches. The threshold constants in `receiver/mod.rs` stay in place. 3. Add `docs/design/pip-7-parallel-receive-delta-receiver-corruption-2026-05-22.md` tracking the open investigation, suspected locations (`crates/engine/src/concurrent_delta/parallel_apply.rs` and `crates/transfer/src/delta_pipeline/parallel.rs`), reproduction recipe, and acceptance criteria for re-promotion. 4. Flag the deferred-pending-PIP-7 status in `README.md`, `CHANGELOG.md`, `docs/design/parallel-receive-delta-default-on.md`, `docs/design/pip-4-closure-2026-05-21.md`, and `docs/design/br-6-sign-off-check-in-2026-05-21.md` so the shipped claims no longer read as if default builds exercise the parallel receive-delta path. The `ParallelDeltaApplier`, `dispatch_receiver_strategy()`, `enable_parallel_receive_delta()`, and the `OC_RSYNC_FORCE_PARALLEL` debug env knob from PIP-4 are intentionally retained; they remain reachable when the feature is opted into so the PIP-7 investigation can iterate against them.
This was referenced May 22, 2026
oferchen
added a commit
that referenced
this pull request
May 22, 2026
…dentity assertion (PIP-9.c) Reintroduce the parallel-threshold-trip regression coverage that PR #4725 removed when it reverted the parallel-receive-delta default-on flip after PIP-4 (#4720) surfaced receiver corruption on file_1.txt under dist-profile builds (LTO + panic=abort). The new tests/parallel_threshold_trip.rs runs a local-mode recursive transfer of 120 deterministically seeded 16 KiB files under parallel_threshold/file_N.txt (the same shape the deleted scenario used in tools/ci/run_interop.sh) and asserts byte identity via SHA-256 on every file, with file_1.txt called out explicitly first so a future regression of the original corruption is unambiguous. The test passes on master HEAD because the sequential receiver path is correct; once PIP-9.b wires the parallel applier into production it will catch any regression of the PIP-4 corruption. Test name starts with parallel_threshold_ so the dist-profile CI cell from PIP-9.d can filter via nextest -E 'test(parallel_threshold)'. Payload generation uses an inline xorshift64* PRNG seeded by a fixed constant XORed with the file index, mirroring the existing pattern in tests/inc_recurse_sender_fuzz_1863.rs. No new external dependencies; the checksums dev-dep already exposes a Sha256 helper used by other workspace tests. Refs: docs/design/pip-9-parallel-receive-delta-wire-up-2026-05-22.md
oferchen
added a commit
that referenced
this pull request
May 22, 2026
…dentity assertion (PIP-9.c) (#4738) Reintroduce the parallel-threshold-trip regression coverage that PR #4725 removed when it reverted the parallel-receive-delta default-on flip after PIP-4 (#4720) surfaced receiver corruption on file_1.txt under dist-profile builds (LTO + panic=abort). The new tests/parallel_threshold_trip.rs runs a local-mode recursive transfer of 120 deterministically seeded 16 KiB files under parallel_threshold/file_N.txt (the same shape the deleted scenario used in tools/ci/run_interop.sh) and asserts byte identity via SHA-256 on every file, with file_1.txt called out explicitly first so a future regression of the original corruption is unambiguous. The test passes on master HEAD because the sequential receiver path is correct; once PIP-9.b wires the parallel applier into production it will catch any regression of the PIP-4 corruption. Test name starts with parallel_threshold_ so the dist-profile CI cell from PIP-9.d can filter via nextest -E 'test(parallel_threshold)'. Payload generation uses an inline xorshift64* PRNG seeded by a fixed constant XORed with the file index, mirroring the existing pattern in tests/inc_recurse_sender_fuzz_1863.rs. No new external dependencies; the checksums dev-dep already exposes a Sha256 helper used by other workspace tests. Refs: docs/design/pip-9-parallel-receive-delta-wire-up-2026-05-22.md
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
…ng parallel threshold (PIP-4) (#4720) * feat(transfer): force-parallel env override + interop scenario crossing parallel threshold (PIP-4) Validates the parallel-receive-delta dispatch path through two complementary mechanisms (PIP-4 / #2567): Runtime override (Part A): `OC_RSYNC_FORCE_PARALLEL=<non-empty>` now short-circuits `ReceiverContext::dispatch_receiver_strategy` and unconditionally selects `ReceiverStrategy::Parallel`, enabling ad-hoc debugging of the parallel apply path without crossing the file-count / total-bytes thresholds. When the `parallel-receive-delta` feature is compiled out, the override logs `parallel_unavailable` under GENR and falls back to Sequential so telemetry never claims a path the binary cannot take. The toggle is intentionally not surfaced on the CLI. Interop coverage (Part B): adds the `parallel-threshold-trip` scenario to the comprehensive interop matrix. The scenario augments the source tree with 120 tiny files (well above `PARALLEL_RECEIVE_FILE_COUNT_THRESHOLD` = 100, well under the 64 MiB byte cutoff and tiny in absolute size so CI time stays low) and validates a byte-identical destination. The new scenario gives the parallel path permanent CI coverage that the existing ~260 KB / 19-file comprehensive payload never exercised. Unit tests use the shared `platform::env::EnvGuard` fixture with a module-local mutex to serialise every test that touches the env var. * chore(transfer): sync Cargo.lock with platform dev-dependency added in PIP-4
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
… receiver corruption) (#4725) PIP-4 (#4720) added the `parallel-threshold-trip` interop scenario that crosses `PARALLEL_RECEIVE_FILE_COUNT_THRESHOLD = 100` and exposed a real corruption bug: the receiver writes wrong bytes for the first dispatched file (`parallel_threshold/file_1.txt`) whenever a transfer trips the parallel-receive-delta dispatch path. The bug reproduces on stock `cargo build --release` because PIP-5 (#4666) flipped the feature into the default set across the workspace. This PR ships the immediate mitigation so default builds are safe again while PIP-7 investigates the receiver-side corruption: 1. Remove `parallel-receive-delta` from `default = [...]` in the workspace `Cargo.toml`, `crates/transfer/Cargo.toml`, and `crates/engine/Cargo.toml`. The feature stays defined and remains opt-in via `--features parallel-receive-delta` for testing. 2. Remove the `parallel-threshold-trip` matrix entry from `tools/ci/run_interop.sh` along with its setup, cleanup, and verify branches. The threshold constants in `receiver/mod.rs` stay in place. 3. Add `docs/design/pip-7-parallel-receive-delta-receiver-corruption-2026-05-22.md` tracking the open investigation, suspected locations (`crates/engine/src/concurrent_delta/parallel_apply.rs` and `crates/transfer/src/delta_pipeline/parallel.rs`), reproduction recipe, and acceptance criteria for re-promotion. 4. Flag the deferred-pending-PIP-7 status in `README.md`, `CHANGELOG.md`, `docs/design/parallel-receive-delta-default-on.md`, `docs/design/pip-4-closure-2026-05-21.md`, and `docs/design/br-6-sign-off-check-in-2026-05-21.md` so the shipped claims no longer read as if default builds exercise the parallel receive-delta path. The `ParallelDeltaApplier`, `dispatch_receiver_strategy()`, `enable_parallel_receive_delta()`, and the `OC_RSYNC_FORCE_PARALLEL` debug env knob from PIP-4 are intentionally retained; they remain reachable when the feature is opted into so the PIP-7 investigation can iterate against them.
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
…dentity assertion (PIP-9.c) (#4738) Reintroduce the parallel-threshold-trip regression coverage that PR #4725 removed when it reverted the parallel-receive-delta default-on flip after PIP-4 (#4720) surfaced receiver corruption on file_1.txt under dist-profile builds (LTO + panic=abort). The new tests/parallel_threshold_trip.rs runs a local-mode recursive transfer of 120 deterministically seeded 16 KiB files under parallel_threshold/file_N.txt (the same shape the deleted scenario used in tools/ci/run_interop.sh) and asserts byte identity via SHA-256 on every file, with file_1.txt called out explicitly first so a future regression of the original corruption is unambiguous. The test passes on master HEAD because the sequential receiver path is correct; once PIP-9.b wires the parallel applier into production it will catch any regression of the PIP-4 corruption. Test name starts with parallel_threshold_ so the dist-profile CI cell from PIP-9.d can filter via nextest -E 'test(parallel_threshold)'. Payload generation uses an inline xorshift64* PRNG seeded by a fixed constant XORed with the file index, mirroring the existing pattern in tests/inc_recurse_sender_fuzz_1863.rs. No new external dependencies; the checksums dev-dep already exposes a Sha256 helper used by other workspace tests. Refs: docs/design/pip-9-parallel-receive-delta-wire-up-2026-05-22.md
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
Closes the PIP-4 validation gap for the
parallel-receive-deltadispatch path (#2567) by adding two complementary mechanisms that, together, give the parallel apply path both an interactive debug switch and permanent CI coverage.OC_RSYNC_FORCE_PARALLEL=<non-empty>short-circuitsReceiverContext::dispatch_receiver_strategyand unconditionally selectsReceiverStrategy::Parallel. When theparallel-receive-deltafeature is compiled out the override logsparallel_unavailableunder GENR and falls back to Sequential so telemetry never claims a path the binary cannot take. The toggle is intentionally not surfaced on the CLI; it is a runtime/debug knob only.parallel-threshold-tripcase intools/ci/run_interop.shaugments the source tree with 120 tiny files (abovePARALLEL_RECEIVE_FILE_COUNT_THRESHOLD = 100, well under the 64 MiB byte cutoff, total payload < 1 MB) and validates a byte-identical destination. The existing comprehensive payload (~260 KB / 19 files) never tripped the threshold, so the parallel branch ran in zero interop transfers prior to this change.Both pieces ship together because the env knob enables interactive debugging of the path the scenario permanently exercises in CI - one without the other leaves PIP-4 only half-validated.
Why one PR
The env override and the interop scenario both serve the same goal: making the parallel-receive-delta dispatch path observable. The override lets engineers reproduce the path on any workload size; the scenario guarantees CI never silently regresses the path. Shipping them in a single commit keeps the validation story coherent.
Notes
PARALLEL_RECEIVE_FILE_COUNT_THRESHOLD,PARALLEL_RECEIVE_BYTES_THRESHOLD) are unchanged - PIP-4 validates the existing tuning, it does not retune.platform::env::EnvGuardfixture (added as a dev-dependency of thetransfercrate) plus a module-local mutex to serialise every test that touches the env var.Test plan
fmt+clippycleannextest (stable)green - new unit tests inreceiver_strategy.rsparallel-threshold-tripscenario passes in both directions across all upstream versions