Repository navigation
Ensure copy skip heuristics verify file content - #2071
Conversation
There was a problem hiding this comment.
💡 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".
| return false; | ||
| } | ||
|
|
||
| true | ||
| files_contents_identical(source_path, destination_path).unwrap_or(false) |
There was a problem hiding this comment.
Avoid reading entire file contents in metadata skip path
The new call to files_contents_identical means every invocation of should_skip_copy now performs a full byte‑for‑byte comparison whenever sizes and mtimes match. execute_transfer uses this helper for every existing destination (lines 68‑77 of copy/transfer.rs), so a no‑op sync will now re‑read both source and destination files in their entirety just to confirm a skip. That effectively enables --checksum behaviour by default and scales linearly with file size, which will massively slow down typical rsync runs with large unchanged files and diverges from upstream’s size/mtime heuristic. Consider limiting the expensive content check to link‑dest validation or an explicit checksum mode.
Useful? React with 👍 / 👎.
…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.
…2067, #2071) Adds three Criterion harnesses under a new internal `bench-internal` feature flag that exposes the minimum surface needed to measure the zsync-inspired matching insertion points without affecting release builds: - `bithash_rejection` (#2063): measures the bithash prefilter rejection rate at 1/16/128 MiB basis sizes, on matching and random targets. Reports static utilization plus observed post-tag rejection rate. - `seq_match_redundant` (#2067): measures `generate_delta` throughput on log-file, tar-archive, and random-control corpora with a target that is basis plus a handful of small mutations, exercising the `want_i` adjacent-match hint path. - `prune_duplicate_heavy` (#2071): measures match throughput with the matched-block pruning bitmap on and off across a zero-heavy VM-disk-style basis, a repeated-blocks synthetic corpus, and a no-duplicates regression control. The new feature exposes only bench-only accessors (`bithash_utilization`, `bithash_admits`, `tag_admits`) and the prune toggle (`with_prune_matched`). It is never enabled by default, never propagated to CLI/daemon, and there is no way to turn it on from a release `oc-rsync` invocation.
…2067, #2071) (#4177) Adds three Criterion harnesses under a new internal `bench-internal` feature flag that exposes the minimum surface needed to measure the zsync-inspired matching insertion points without affecting release builds: - `bithash_rejection` (#2063): measures the bithash prefilter rejection rate at 1/16/128 MiB basis sizes, on matching and random targets. Reports static utilization plus observed post-tag rejection rate. - `seq_match_redundant` (#2067): measures `generate_delta` throughput on log-file, tar-archive, and random-control corpora with a target that is basis plus a handful of small mutations, exercising the `want_i` adjacent-match hint path. - `prune_duplicate_heavy` (#2071): measures match throughput with the matched-block pruning bitmap on and off across a zero-heavy VM-disk-style basis, a repeated-blocks synthetic corpus, and a no-duplicates regression control. The new feature exposes only bench-only accessors (`bithash_utilization`, `bithash_admits`, `tag_admits`) and the prune toggle (`with_prune_matched`). It is never enabled by default, never propagated to CLI/daemon, and there is no way to turn it on from a release `oc-rsync` invocation.
…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.
…2067, #2071) (#4177) Adds three Criterion harnesses under a new internal `bench-internal` feature flag that exposes the minimum surface needed to measure the zsync-inspired matching insertion points without affecting release builds: - `bithash_rejection` (#2063): measures the bithash prefilter rejection rate at 1/16/128 MiB basis sizes, on matching and random targets. Reports static utilization plus observed post-tag rejection rate. - `seq_match_redundant` (#2067): measures `generate_delta` throughput on log-file, tar-archive, and random-control corpora with a target that is basis plus a handful of small mutations, exercising the `want_i` adjacent-match hint path. - `prune_duplicate_heavy` (#2071): measures match throughput with the matched-block pruning bitmap on and off across a zero-heavy VM-disk-style basis, a repeated-blocks synthetic corpus, and a no-duplicates regression control. The new feature exposes only bench-only accessors (`bithash_utilization`, `bithash_admits`, `tag_admits`) and the prune toggle (`with_prune_matched`). It is never enabled by default, never propagated to CLI/daemon, and there is no way to turn it on from a release `oc-rsync` invocation.
…2067, #2071) (#4177) Adds three Criterion harnesses under a new internal `bench-internal` feature flag that exposes the minimum surface needed to measure the zsync-inspired matching insertion points without affecting release builds: - `bithash_rejection` (#2063): measures the bithash prefilter rejection rate at 1/16/128 MiB basis sizes, on matching and random targets. Reports static utilization plus observed post-tag rejection rate. - `seq_match_redundant` (#2067): measures `generate_delta` throughput on log-file, tar-archive, and random-control corpora with a target that is basis plus a handful of small mutations, exercising the `want_i` adjacent-match hint path. - `prune_duplicate_heavy` (#2071): measures match throughput with the matched-block pruning bitmap on and off across a zero-heavy VM-disk-style basis, a repeated-blocks synthetic corpus, and a no-duplicates regression control. The new feature exposes only bench-only accessors (`bithash_utilization`, `bithash_admits`, `tag_admits`) and the prune toggle (`with_prune_matched`). It is never enabled by default, never propagated to CLI/daemon, and there is no way to turn it on from a release `oc-rsync` invocation.
…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.
…2067, #2071) (#4177) Adds three Criterion harnesses under a new internal `bench-internal` feature flag that exposes the minimum surface needed to measure the zsync-inspired matching insertion points without affecting release builds: - `bithash_rejection` (#2063): measures the bithash prefilter rejection rate at 1/16/128 MiB basis sizes, on matching and random targets. Reports static utilization plus observed post-tag rejection rate. - `seq_match_redundant` (#2067): measures `generate_delta` throughput on log-file, tar-archive, and random-control corpora with a target that is basis plus a handful of small mutations, exercising the `want_i` adjacent-match hint path. - `prune_duplicate_heavy` (#2071): measures match throughput with the matched-block pruning bitmap on and off across a zero-heavy VM-disk-style basis, a repeated-blocks synthetic corpus, and a no-duplicates regression control. The new feature exposes only bench-only accessors (`bithash_utilization`, `bithash_admits`, `tag_admits`) and the prune toggle (`with_prune_matched`). It is never enabled by default, never propagated to CLI/daemon, and there is no way to turn it on from a release `oc-rsync` invocation.
Summary
Testing
[Codex Task](