Skip to content

perf: use SHORT_SUM_LENGTH for phase 1 checksums in receiver - #2567

Merged
oferchen merged 1 commit into
masterfrom
fix/checksum-length-phase-toggle
Mar 7, 2026
Merged

oferchen merged 1 commit into
masterfrom
fix/checksum-length-phase-toggle

Conversation

@oferchen

@oferchen oferchen commented Mar 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • Phase 1 signatures now use SHORT_SUM_LENGTH (2 bytes) instead of 16 bytes, reducing wire overhead for initial delta transfers (upstream: generator.c:2157)
  • Phase 2 redo switches to full MAX_SUM_LENGTH (16 bytes) for maximum collision resistance (upstream: generator.c:2163)
  • Applied to both run_pipelined and run_pipelined_incremental code paths

Test plan

  • cargo clippy -p transfer passes with no warnings
  • 62 checksum-related tests pass locally
  • CI: fmt+clippy, nextest (stable), Windows, macOS, Linux musl

Phase 1 now uses SHORT_SUM_LENGTH (2 bytes) instead of MAX_SUM_LENGTH
(16 bytes) for signature checksums, matching upstream generator.c:2157.
Phase 2 redo switches to full MAX_SUM_LENGTH (16 bytes) for maximum
collision resistance, matching upstream generator.c:2163.

Applied to both run_pipelined and run_pipelined_incremental paths.
@oferchen
oferchen merged commit ffb2520 into master Mar 7, 2026
32 checks passed
@oferchen
oferchen deleted the fix/checksum-length-phase-toggle branch March 7, 2026 10:17
oferchen added a commit that referenced this pull request May 1, 2026
Phase 1 now uses SHORT_SUM_LENGTH (2 bytes) instead of MAX_SUM_LENGTH
(16 bytes) for signature checksums, matching upstream generator.c:2157.
Phase 2 redo switches to full MAX_SUM_LENGTH (16 bytes) for maximum
collision resistance, matching upstream generator.c:2163.

Applied to both run_pipelined and run_pipelined_incremental paths.
oferchen added a commit that referenced this pull request May 5, 2026
Phase 1 now uses SHORT_SUM_LENGTH (2 bytes) instead of MAX_SUM_LENGTH
(16 bytes) for signature checksums, matching upstream generator.c:2157.
Phase 2 redo switches to full MAX_SUM_LENGTH (16 bytes) for maximum
collision resistance, matching upstream generator.c:2163.

Applied to both run_pipelined and run_pipelined_incremental paths.
oferchen added a commit that referenced this pull request May 22, 2026
…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 added a commit that referenced this pull request May 22, 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
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant