Skip to content

data_plane: consume packed HLL delta + CountMin hh_keys (align to asap_sketchlib main) - #350

Merged
zzylol merged 1 commit into
mainfrom
backend-delta-wire-format
May 26, 2026
Merged

zzylol merged 1 commit into
mainfrom
backend-delta-wire-format

Conversation

@zzylol

@zzylol zzylol commented May 26, 2026

Copy link
Copy Markdown
Contributor

Aligns data_plane's sketch delta-apply with the current asap_sketchlib wire format (the DDSketch scalar-less alignment already landed via #345/#346; this adds the remaining HLL + CountMin pieces). Delta transmission is OFF by default, so this only affects how an enabled delta frame is decoded.

HLL — packed delta

The HLL delta wire format is now a varint-packed (index_delta, value) blob (was repeated HLLRegisterUpdate). Both decode sites (HllSketchAccumulator::apply_proto_delta_bytes and the query reducer's apply_hll_proto_delta) now delegate to HllSketch::apply_delta_bytes — single source of truth, no parallel decoder. Vendored hll_delta.proto updated to bytes packed_updates; HLL round-trip tests build the packed blob.

CountMin — hh_keys

asap_sketchlib::CountMinSketchDelta gained an hh_keys field (unifying with CountSketch). The CountMin apply path passes an empty set (no TopK to rebuild here), mirroring the existing CountSketch handling.

Test alignment

The CMS/CountSketch from_sketchlib_proto_bytes zero-dims tests now assert the current validate_sketch_dims message ("degenerate dims").

Verification

cargo build --workspace clean; cargo test -p data_plane --lib: 782 passed, 0 failed (2 pre-existing #[ignore]d e2e tests untouched).

Depends on asap_sketchlib#61 (packed HLL apply_delta_bytes + CountMinSketchDelta.hh_keys), now merged to asap_sketchlib main.

🤖 Generated with Claude Code

Align the backend's delta-apply with asap_sketchlib's updated wire format:

- HLL delta is now a varint-packed (index_delta, value) blob (was repeated
  per-register sub-messages). Decode + apply via HllSketch::apply_delta_bytes
  (single source of truth) instead of the vendored nested decode; vendored
  hll_delta.proto updated to bytes packed_updates; HLL round-trip tests build
  the packed blob.
- CountMinSketchDelta gained an hh_keys field upstream; pass an empty set on
  the CountMin apply path (no TopK to rebuild here), mirroring CountSketch.
- Update the CMS/CountSketch zero-dims decode tests to assert the current
  validate_sketch_dims message ('degenerate dims') surfaced by the bump.

DDSketch alignment (scalar-less wire) is already on main (#345/#346).
cargo build --workspace clean; cargo test -p data_plane --lib: 782 passed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@zzylol
zzylol merged commit 2d30eda into main May 26, 2026
@zzylol
zzylol deleted the backend-delta-wire-format branch May 26, 2026 23:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant