Skip to content

docs(audits): zsync packed-key layout feasibility (#2072) - #4192

Merged
oferchen merged 1 commit into
masterfrom
experiment/zsync-compact-keys-packed-2072
May 17, 2026
Merged

oferchen merged 1 commit into
masterfrom
experiment/zsync-compact-keys-packed-2072

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

  • Documents the no-op decision for the compact-keys packed-layout prototype scoped by Fix ignore-times handling for quick checks #2072.
  • Records that the current CompactLookup (8-byte slots, 8 per cache line, Robin Hood probing) already realizes the Option-C layout from docs/design/zsync-hash-layout-decision.md.
  • Explains why a 4-byte (rsum_low | block_idx) slot is not feasible: 16-bit block indices cap at 65 535, which any 16 MiB transfer at the default block size already exceeds.
  • Defers per the ADR's revisit triggers; the pre-existing Fix delta copy test expectations #2073 bench (compact_keys_cache.rs) remains the gate for any future denser variant.

Decision rationale

The task framing assumed (rsum_low, bucket_idx) were separate fields; in fact the current CompactLookup already packs (packed_u32_key, u32_block_idx) into a single u64 slot. A further-packed 4-byte slot would either truncate the block-index space (regression) or reintroduce indirection (defeats the optimization). The 87.5% bithash + tag-table rejection rate also structurally bounds the cache benefit of any denser slot.

Test plan

  • CI fmt + clippy pass (docs-only change, no Rust source touched).
  • CI nextest stable pass (unchanged behaviour by construction).
  • Cross-platform matrix (Windows, macOS, Linux musl) pass.
  • Markdown lint clean (matches sibling audit doc style under docs/audits/).

Records the no-op decision for the compact-keys packed-layout prototype.
The current `CompactLookup` already realizes the zsync-style open-addressed
table from the layout ADR with 8-byte slots packing the full rolling-sum
key and a `u32` block index. A 4-byte slot in the `(rsum_low | block_idx)`
shape would cap `block_idx` at 65 535, which any 16 MiB transfer at the
default block size already exceeds. Defer per the ADR's revisit triggers;
the existing #2073 cache bench remains the gate for any future denser
variant.
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label May 16, 2026
@oferchen
oferchen merged commit b292e08 into master May 17, 2026
8 checks passed
@oferchen
oferchen deleted the experiment/zsync-compact-keys-packed-2072 branch May 17, 2026 19:13
oferchen added a commit that referenced this pull request May 18, 2026
Records the no-op decision for the compact-keys packed-layout prototype.
The current `CompactLookup` already realizes the zsync-style open-addressed
table from the layout ADR with 8-byte slots packing the full rolling-sum
key and a `u32` block index. A 4-byte slot in the `(rsum_low | block_idx)`
shape would cap `block_idx` at 65 535, which any 16 MiB transfer at the
default block size already exceeds. Defer per the ADR's revisit triggers;
the existing #2073 cache bench remains the gate for any future denser
variant.
oferchen added a commit that referenced this pull request May 18, 2026
Records the no-op decision for the compact-keys packed-layout prototype.
The current `CompactLookup` already realizes the zsync-style open-addressed
table from the layout ADR with 8-byte slots packing the full rolling-sum
key and a `u32` block index. A 4-byte slot in the `(rsum_low | block_idx)`
shape would cap `block_idx` at 65 535, which any 16 MiB transfer at the
default block size already exceeds. Defer per the ADR's revisit triggers;
the existing #2073 cache bench remains the gate for any future denser
variant.
oferchen added a commit that referenced this pull request Aug 24, 2026
Records the no-op decision for the compact-keys packed-layout prototype.
The current `CompactLookup` already realizes the zsync-style open-addressed
table from the layout ADR with 8-byte slots packing the full rolling-sum
key and a `u32` block index. A 4-byte slot in the `(rsum_low | block_idx)`
shape would cap `block_idx` at 65 535, which any 16 MiB transfer at the
default block size already exceeds. Defer per the ADR's revisit triggers;
the existing #2073 cache bench remains the gate for any future denser
variant.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant