Repository navigation
fix(matching): report upstream's hash_hits and false_alarms counters - #8252
Merged
Merged
Conversation
oferchen
added a commit
that referenced
this pull request
Oct 28, 2026
The -vv total: line printed oc-native probe counts: bithash positives and their verify failures. upstream defines both by its own hash_table (match.c:84-110 build_hash_table, 214-271 hash_search): hash_hits is one per probed offset whose bucket is non-empty, false_alarms one per chain candidate whose weak sum matches but whose strong sum does not. On a 200,000-line delta oc printed 1262/120 locally and 1130/1129 on the wire against upstream's 1165/0. UpstreamHashTable rebuilds that table and walks its chains at every offset upstream probes, including the shrinking-window offsets past the last full window and the --inplace chain pruning. Every sequential scan (local engine, wire sender, consecutive-match scan) feeds it, but only while DEBUG_GTE(DELTASUM, 1) reports the counters, and the parallel chunked scan is not chosen then. matches and data were already exact.
oferchen
force-pushed
the
feat/local-vvv-parity
branch
from
October 28, 2026 20:09
c41fc92 to
bf21550
Compare
4 tasks done
Carries the session_fork.rs fix from #8253 so this branch's macOS jobs stop failing on the master test-harness race: on EPERM for our own child, SIGKILL the leader before a blocking WNOWAIT wait, and accept a setpgid refusal when the child already leads its own group. The content is identical to #8253, so the two merge without conflict.
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
-vvtotal:line now reports upstream rsync 3.5.1'shash_hitsandfalse_alarms, not oc-native counts. upstream defines both by its ownhash_table:match.c:84-110build_hash_table()and214-271hash_search().hash_hitsis one per probed offset whose bucket is non-empty.false_alarmsis one per chain candidate whose weak sum matches but whose strong sum does not. oc's matcher uses a different index (tag table, bithash, compact buckets), so its counts never matched upstream's.matching::UpstreamHashTablerebuilds upstream's table with its geometry and chain order, then walks the chains at every offset upstream probes. That includes the shrinking-window offsets past the last full window (match.c:197,362-364) and the--inplacechain pruning (match.c:233-237). Three scans feed it: the local engine, the wire sender and the consecutive-match scan. They do so only whileDEBUG_GTE(DELTASUM, 1)reports the counters, so the default path does no extra work. While the counters are reported the parallel chunked scan is not selected.matchesanddatawere already exact.find_match_window_counted) is removed.Oracle evidence (host, upstream 3.5.1)
total:line for-rvv --no-whole-file, shown ashash_hits / false_alarms:--checksum-seed=1)matchesanddataare equal in every cell, before and after.Test plan
crates/cli/tests/delta_total_line_oracle.rs. Each of three fixtures must give upstream's line in local, push and pull mode. The redo fixture is checked in undercrates/cli/tests/fixtures/delta_total/.crates/matching/src/index/upstream_hash_tests.rs:MAX_CHAIN_LENcap;--inplaceunlinking.check_rustfmt_all, workspace clippy, no-default clippy for matching, engine, transfer and cli, windows-gnu check with--tests, nextest for matching (all) and the delta-related engine, transfer and cli tests,unsafe_owner_deps,dead_code_census, no-placeholders.CI:
.github/workflows/_interop.ymlruns the new oracle (binary(delta_total_line_oracle)) after the delta token parity oracle.Coordination
-vvvparity epic (task 453): task 313.Pre-merge checklist
cargo fmt --allrun locally.CHANGELOG.mdupdated if user-visible.