Skip to content

Align --rsync-path forwarding with upstream#2199

Merged
oferchen merged 1 commit into
masterfrom
fix-server-and-rsync-path-implementations
Nov 21, 2025
Merged

Align --rsync-path forwarding with upstream#2199
oferchen merged 1 commit into
masterfrom
fix-server-and-rsync-path-implementations

Conversation

@oferchen
Copy link
Copy Markdown
Owner

Summary

  • encode --rsync-path as a single --rsync-path= argument to mirror upstream server invocation
  • update remote fallback tests to expect the combined argument form

Testing

  • cargo test -p cli remote_fallback_forwards_rsync_path_option

Codex Task

@oferchen oferchen merged commit b15f18d into master Nov 21, 2025
5 checks passed
@oferchen oferchen deleted the fix-server-and-rsync-path-implementations branch November 21, 2025 09:10
oferchen added a commit that referenced this pull request May 16, 2026
…CURSE I4) (#4120)

* feat(transfer): add wire_to_flat_ndx partition_point counters (INC_RECURSE I4)

Adds INC_RECURSE diagnostic counter I4 (#2199): two process-global
AtomicU64 counters per side (generator and receiver) that track every
wire_to_flat_ndx / flat_to_wire_ndx invocation and the cumulative
partition_point comparison depth across the segment table.

The counters are sampled at end-of-transfer in the existing finalize
paths used by PR #4103 for the first-byte latency probe:

- generator: GeneratorContext::run, just before returning GeneratorStats
- receiver: finalize_transfer in receiver/transfer/phases.rs

Both sides emit a debug_log!(Genr, 1, ...) line with the totals and,
when the optional tracing feature is enabled, a tracing::debug! event
at rsync::generator::ndx_convert / rsync::receiver::ndx_convert.

A small partition_point_depth(len) helper approximates the worst-case
comparison count as floor(log2(len)) + 1.

Public API: a new ndx_convert_totals() free function in both modules
returns (call_count, cumulative_partition_point_depth). It is the only
addition to the public surface; no CLI flag, no wire-format change, no
change to the existing wire_to_flat_ndx / flat_to_wire_ndx signatures.

Unit tests in both crates exercise the converters and assert:

- the call counter monotonically grows by at least the number of
  invocations made in the test (>= guards against concurrent test
  runs incrementing the shared counter)
- the cumulative partition_point depth grows by at least
  N * depth(segment_table_len) after N calls against a known-size
  segment table

Closes #2199

* chore: regenerate Cargo.lock

* style: cargo fmt
oferchen added a commit that referenced this pull request May 18, 2026
…CURSE I4) (#4120)

* feat(transfer): add wire_to_flat_ndx partition_point counters (INC_RECURSE I4)

Adds INC_RECURSE diagnostic counter I4 (#2199): two process-global
AtomicU64 counters per side (generator and receiver) that track every
wire_to_flat_ndx / flat_to_wire_ndx invocation and the cumulative
partition_point comparison depth across the segment table.

The counters are sampled at end-of-transfer in the existing finalize
paths used by PR #4103 for the first-byte latency probe:

- generator: GeneratorContext::run, just before returning GeneratorStats
- receiver: finalize_transfer in receiver/transfer/phases.rs

Both sides emit a debug_log!(Genr, 1, ...) line with the totals and,
when the optional tracing feature is enabled, a tracing::debug! event
at rsync::generator::ndx_convert / rsync::receiver::ndx_convert.

A small partition_point_depth(len) helper approximates the worst-case
comparison count as floor(log2(len)) + 1.

Public API: a new ndx_convert_totals() free function in both modules
returns (call_count, cumulative_partition_point_depth). It is the only
addition to the public surface; no CLI flag, no wire-format change, no
change to the existing wire_to_flat_ndx / flat_to_wire_ndx signatures.

Unit tests in both crates exercise the converters and assert:

- the call counter monotonically grows by at least the number of
  invocations made in the test (>= guards against concurrent test
  runs incrementing the shared counter)
- the cumulative partition_point depth grows by at least
  N * depth(segment_table_len) after N calls against a known-size
  segment table

Closes #2199

* chore: regenerate Cargo.lock

* style: cargo fmt
oferchen added a commit that referenced this pull request May 18, 2026
…CURSE I4) (#4120)

* feat(transfer): add wire_to_flat_ndx partition_point counters (INC_RECURSE I4)

Adds INC_RECURSE diagnostic counter I4 (#2199): two process-global
AtomicU64 counters per side (generator and receiver) that track every
wire_to_flat_ndx / flat_to_wire_ndx invocation and the cumulative
partition_point comparison depth across the segment table.

The counters are sampled at end-of-transfer in the existing finalize
paths used by PR #4103 for the first-byte latency probe:

- generator: GeneratorContext::run, just before returning GeneratorStats
- receiver: finalize_transfer in receiver/transfer/phases.rs

Both sides emit a debug_log!(Genr, 1, ...) line with the totals and,
when the optional tracing feature is enabled, a tracing::debug! event
at rsync::generator::ndx_convert / rsync::receiver::ndx_convert.

A small partition_point_depth(len) helper approximates the worst-case
comparison count as floor(log2(len)) + 1.

Public API: a new ndx_convert_totals() free function in both modules
returns (call_count, cumulative_partition_point_depth). It is the only
addition to the public surface; no CLI flag, no wire-format change, no
change to the existing wire_to_flat_ndx / flat_to_wire_ndx signatures.

Unit tests in both crates exercise the converters and assert:

- the call counter monotonically grows by at least the number of
  invocations made in the test (>= guards against concurrent test
  runs incrementing the shared counter)
- the cumulative partition_point depth grows by at least
  N * depth(segment_table_len) after N calls against a known-size
  segment table

Closes #2199

* chore: regenerate Cargo.lock

* style: cargo fmt
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