Skip to content

Avoid checksum comparisons when timestamps match - #2068

Merged
oferchen merged 1 commit into
masterfrom
fix-test-failure-in-transfer_request_with_ignore_times
Nov 8, 2025
Merged

oferchen merged 1 commit into
masterfrom
fix-test-failure-in-transfer_request_with_ignore_times

Conversation

@oferchen

@oferchen oferchen commented Nov 8, 2025 •

Copy link
Copy Markdown
Owner

Summary

  • align the local copy skip decision with upstream behavior by relying on timestamps alone when checksum comparisons are not requested

Testing

  • cargo test -p oc-rsync-cli transfer_request_with_ignore_times_forces_copy_despite_matching_timestamps

[Codex Task](

@oferchen
oferchen merged commit 4c258c6 into master Nov 8, 2025
@oferchen
oferchen deleted the fix-test-failure-in-transfer_request_with_ignore_times branch November 8, 2025 13:59

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 115 to 118
return false;
}

if !checksum && !size_only && modify_window.is_zero() && src == dst {
return files_checksum_match(source_path, destination_path, checksum_algorithm)
.unwrap_or(false);
}

true

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve content verification when mtimes match

After the change, should_skip_copy returns true as soon as the source and destination mtimes fall within the modify window, even when modify_window is zero and both files have identical timestamps. Without the previous checksum guard, two files with the same size and synchronized mtimes but different contents (e.g., someone edits the file and then runs touch -r) will be treated as identical unless --checksum is explicitly requested, causing the stale destination to be left untouched. The repository already has tests such as should_skip_copy_detects_content_changes_with_identical_timestamps that relied on the checksum comparison to prevent this situation, so this regression will skip copying modified files.

Useful? React with 👍 / 👎.

oferchen added a commit that referenced this pull request May 1, 2026
…nsport (#1938) (#3525)

Formalizes the SSH stdio transport audit at docs/audits/ssh-socketpair-vs-pipes.md
under tracker #1938, consolidating prior #1686 working notes (PR #3438), the
io_uring boundary documented for #1858 (PR #3418), and the stderr socketpair
shipped under #1689 (PR #3383). Restructures the document into the formal
seven-section layout (summary, upstream reference, current implementation,
trade-offs, decision matrix, recommendation, implementation notes) plus
findings and references.

Recommends keeping anonymous pipes for the SSH wire and not pursuing the
socketpair migration: splice(2) and vmsplice(2) require a pipe end, the
zero-copy plan in #1860 depends on that, and the unified-FD argument is
subsumed by the async-transport refactor (#2068, #1655). Closes #1687
(prototype socketpair wire) as do-not-implement and #1902 (verify wire
claim against rsync_io source) as verified.

Citations were re-checked against worktree source: builder.rs:300-301
(Stdio::piped on the wire), aux_channel.rs:263-285 (UnixStream::pair for
stderr, Unix only), connection.rs:30-39 (SshConnection struct),
mod.rs:57-75 (io_uring boundary). Upstream evidence verified against
target/interop/upstream-src/rsync-3.4.1/: pipe.c:48-97 (piped_child),
util1.c:74-96 (fd_pair), main.c:504-663 (do_cmd dispatch),
clientserver.c:116-148 (daemon TCP wire), socket.c:736-846 (sock_exec
test escape).
oferchen added a commit that referenced this pull request May 5, 2026
…nsport (#1938) (#3525)

Formalizes the SSH stdio transport audit at docs/audits/ssh-socketpair-vs-pipes.md
under tracker #1938, consolidating prior #1686 working notes (PR #3438), the
io_uring boundary documented for #1858 (PR #3418), and the stderr socketpair
shipped under #1689 (PR #3383). Restructures the document into the formal
seven-section layout (summary, upstream reference, current implementation,
trade-offs, decision matrix, recommendation, implementation notes) plus
findings and references.

Recommends keeping anonymous pipes for the SSH wire and not pursuing the
socketpair migration: splice(2) and vmsplice(2) require a pipe end, the
zero-copy plan in #1860 depends on that, and the unified-FD argument is
subsumed by the async-transport refactor (#2068, #1655). Closes #1687
(prototype socketpair wire) as do-not-implement and #1902 (verify wire
claim against rsync_io source) as verified.

Citations were re-checked against worktree source: builder.rs:300-301
(Stdio::piped on the wire), aux_channel.rs:263-285 (UnixStream::pair for
stderr, Unix only), connection.rs:30-39 (SshConnection struct),
mod.rs:57-75 (io_uring boundary). Upstream evidence verified against
target/interop/upstream-src/rsync-3.4.1/: pipe.c:48-97 (piped_child),
util1.c:74-96 (fd_pair), main.c:504-663 (do_cmd dispatch),
clientserver.c:116-148 (daemon TCP wire), socket.c:736-846 (sock_exec
test escape).
oferchen added a commit that referenced this pull request May 5, 2026
…tness (#3644)

Sub-design for the prune insertion point of
`docs/design/zsync-inspired-matching.md` (#2068, blocking impl #2069,
proptest #2070, benchmark #2071).

Covers what zsync does at write_blocks (rsum.c:109-119) and how
oc-rsync mirrors it inside crates/match/. Pins the insertion to the
inner-loop COPY emit at generator.rs:214. Specifies the MatchedBlocks
bitmap (1 bit per signature block, 128 B at 1k blocks, 12.5 MB at
100M), placement alongside DeltaSignatureIndex, and the extended probe
order (bithash -> tag_table -> bucket lookup -> bitmap filter ->
strong-checksum). Spells out duplicate-bucket correctness with a
worked example, the property-test contract, and the bench corpora
(VM disk images, log tarballs, synthetic). Restates the wire-compat
invariants and the no-CLI/no-protocol cleanup contract.
oferchen added a commit that referenced this pull request May 7, 2026
…#3933)

Document the four wire-compatible zsync-inspired matching speedups
(bithash prefilter #2059-2062, seq-match extend-run #2064-2066,
matched-block pruning #2068-2070, compact-keys layout #2072-2073)
with CHANGELOG snippets, a release notes block, an anti-spec
forbidding wire-feature advertisement, and a placeholder for
benchmark numbers pending #2081 and #2082.
oferchen added a commit that referenced this pull request May 18, 2026
…tness (#3644)

Sub-design for the prune insertion point of
`docs/design/zsync-inspired-matching.md` (#2068, blocking impl #2069,
proptest #2070, benchmark #2071).

Covers what zsync does at write_blocks (rsum.c:109-119) and how
oc-rsync mirrors it inside crates/match/. Pins the insertion to the
inner-loop COPY emit at generator.rs:214. Specifies the MatchedBlocks
bitmap (1 bit per signature block, 128 B at 1k blocks, 12.5 MB at
100M), placement alongside DeltaSignatureIndex, and the extended probe
order (bithash -> tag_table -> bucket lookup -> bitmap filter ->
strong-checksum). Spells out duplicate-bucket correctness with a
worked example, the property-test contract, and the bench corpora
(VM disk images, log tarballs, synthetic). Restates the wire-compat
invariants and the no-CLI/no-protocol cleanup contract.
oferchen added a commit that referenced this pull request May 18, 2026
…#3933)

Document the four wire-compatible zsync-inspired matching speedups
(bithash prefilter #2059-2062, seq-match extend-run #2064-2066,
matched-block pruning #2068-2070, compact-keys layout #2072-2073)
with CHANGELOG snippets, a release notes block, an anti-spec
forbidding wire-feature advertisement, and a placeholder for
benchmark numbers pending #2081 and #2082.
oferchen added a commit that referenced this pull request Aug 24, 2026
…tness (#3644)

Sub-design for the prune insertion point of
`docs/design/zsync-inspired-matching.md` (#2068, blocking impl #2069,
proptest #2070, benchmark #2071).

Covers what zsync does at write_blocks (rsum.c:109-119) and how
oc-rsync mirrors it inside crates/match/. Pins the insertion to the
inner-loop COPY emit at generator.rs:214. Specifies the MatchedBlocks
bitmap (1 bit per signature block, 128 B at 1k blocks, 12.5 MB at
100M), placement alongside DeltaSignatureIndex, and the extended probe
order (bithash -> tag_table -> bucket lookup -> bitmap filter ->
strong-checksum). Spells out duplicate-bucket correctness with a
worked example, the property-test contract, and the bench corpora
(VM disk images, log tarballs, synthetic). Restates the wire-compat
invariants and the no-CLI/no-protocol cleanup contract.
oferchen added a commit that referenced this pull request Aug 24, 2026
…#3933)

Document the four wire-compatible zsync-inspired matching speedups
(bithash prefilter #2059-2062, seq-match extend-run #2064-2066,
matched-block pruning #2068-2070, compact-keys layout #2072-2073)
with CHANGELOG snippets, a release notes block, an anti-spec
forbidding wire-feature advertisement, and a placeholder for
benchmark numbers pending #2081 and #2082.
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