Add a two-tier presence bloom to the dense tag store (phase 2)#12046
Draft
dougqh wants to merge 1 commit into
Draft
Add a two-tier presence bloom to the dense tag store (phase 2)#12046dougqh wants to merge 1 commit into
dougqh wants to merge 1 commit into
Conversation
Bits has a CI fix ready🟢 Investigated · 🟢 Fix prepared · ⚪ Validation skipped · 🟠 Ready Wrapped the dense-tag initialization comment in View in Datadog | Reviewed commit d6e7088 · Any feedback? Reach out in #deveng-pr-agent |
|
🎯 Code Coverage (details) 🔗 Commit SHA: d6e7088 | Docs | Datadog PR Page | Give us feedback! |
Replace the dense store's linear knownIndexOf scan gate with a two-tier presence filter driven by the tag-id's declaration coordinate: a per-map knownGroupMask (1L << group-decl) checked first, then a knownFieldMask (field-decl & 63). Either bit clear proves the tag definitely absent, so an append is O(1) and a read-through parent whose groups are disjoint from ours never pays a scan. The scan stays authoritative (superset semantics); the masks are never cleared on removal (a stale-set bit only costs a scan, whereas clearing could drop a bit still shared via collision -> false negative). Splits the tag-id encoding into group-decl (6 bits) + field-decl (10 bits) in KnownTagCodec (dropping nameHash from known ids) so the coordinate feeds the filter, and carries an interim hand-maintained coordinate KnownTags table (the tag-registry generator replaces it with a byte-equal generated one in a follow-up). Read-through stays chain-aware: parentDenseVisible prunes each ancestor level's scan with that level's own two-tier filter. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This was referenced Jul 23, 2026
Contributor
🟢 Java Benchmark SLOs — All performance SLOs passed
PR vs. master results
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
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.
What
Adds a per-map bloom presence filter (
knownBloom, a singlelong) to the dense tag store so a "definitely absent" known tag is answered without scanningknownIds. Each dense write ORs inknownBloomBit(tagId); reads (knownRawValue,removeKnown, and the read-through shadow checkparentDenseVisible) test the bit first and skipknownIndexOfon a miss.knownBloomis intentionally not cleared on removal — a stale-set bit only costs a scan, whereas clearing could drop a bit still shared (via collision) by a present id, which would be a false negative.parentDenseVisibleprunes each ancestor level's scan with that level's own bloom.Why
The dense store's
knownIndexOfis a linear scan. The bloom prune brings dense presence checks to HashMap-insertion parity at ~7 tags while keeping the allocation win — see the tag-id/bloom session notes. Alloc unchanged; this is the CPU-side complement to dense.Stack
tagset → dense-store (#12045) → **bloom** → generator. Base isdougqh/dense-store-v2. Supersedes the bloom portion of the old reconcile stack (#11900).Test
TagMapDenseForkedTest,TagMapDenseFuzzForkedTest,KnownTagsTestgreen;spotbugsMain+spotlessJavaCheckclean.🤖 Generated with Claude Code