edge: CountSketch dim-validation + nil-guards, drop counters, warm-lateness, cache pruning, hot-path scratch (review follow-ups) - #464
Merged
Conversation
…unters, warm-lateness, SnapshotCache pruning, hot-path scratch Code-review follow-ups to the asap_edge edge processor + precompute runtime: - P0 CountSketch nil-panic: config_validate.go pre-validates the 64-bit row-hash budget (rows*ceil(log2(cols))<=64, pow2 cols) for FamilyCountSketch and rejects at boot; warm_sketch.go stops discarding the wrapper constructor error (logs + skips wiring instead of building a nil-backed sketch); countsketch.go wrapper nil-guards UpdateString/Snapshot/Reset. - P0 silent series drop: precompute.go finishRotate + the processor flush now increment a DroppedSerialize / encode-drop counter (telemetry.go) instead of dropping invisibly. - P1 warm lateness: new Config.WarmAllowedLateness knob (defaults to WindowDuration) decouples warm-window admission from the cold reorder-grace (2s), so processing-delayed-but-in-window samples are no longer dropped. - P1 unbounded SnapshotCache (agent memory pin): SnapshotCache.RetainKeys prunes outbound/inbound entries for series absent from the just-closed window. - P1 hot-path allocs: per-shard scratch buffers (kv slice, attr-key bytes, Observation) reused in observe() (residual SeriesKeyFor/AttributesKey string allocs flagged for a future zero-alloc precompute API). - P1 envelope double-count guard (forwarder path); delta-threshold comment fixed; dead Shutdown code removed. Tests added throughout. No exported signatures changed (all additions are additive). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
zzylol
marked this pull request as ready for review
May 27, 2026 18:47
Contributor
Author
Integrated end-to-end validation — 6/6 query families pass warmAll five parallel review-fix agents' changes were integrated (disjoint files, no conflicts) and validated together on a fresh localhost deploy of all three rebuilt images:
Known non-blocking item: the new 🤖 Generated with Claude Code |
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.
Code-review follow-ups to the
asap_edgeedge processor + precompute runtime. Part of a 3-repo review-fix set (with sketchlib-gofix/wire-format-review-followups+ ASAPQuery-backendfix/backend-review-followups).Fixes
rows*ceil(log2(cols))<=64, pow2 cols); factory no longer discards the constructor error (logs + skips instead of a nil-backed sketch); wrapper nil-guards.DroppedSerialize/encode-drop counters instead of invisible drops.WarmAllowedLatenessknob (defaults toWindowDuration) decouples warm-window admission from the 2s cold reorder-grace.RetainKeysprunes vanished series each window.observe()(residual string allocs flagged for a future zero-alloc API).No exported signatures changed. Excludes unrelated working-tree edits (asap-gorilla-go/intchunk).
🤖 Generated with Claude Code