[Feature] BanyanDB: local-scan performance follow-up for tag aggregation (optional)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 38/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- java
- Domain
- databases, performance
Research direction
Start with the tag aggregation design README, especially §7.7 and §12, then trace the existing searchSeriesList projection split and per-row scan path. Compare Phase A and Phase B against the existing decoding behavior using the same index-mode and part-backed fixtures. Done means identical differential-test results, fewer group-map probes for Phase A, and the specified range-containment behavior for Phase B.
Written by the indexing model from the issue text.
Description
Part 5 of 5 of the tag aggregation and time bucketing design, shipped in apache/skywalking-banyandb#1360.
Design references: §7.7 The local scan: entity and indexed tags never touch the data file · §12 Delivery order (stages 8a–9, both marked optional in the design)
Depends on: #14089 (time-bucket grouping) and #14090 (COUNT_DISTINCT) — this optimizes both. Not required for either to ship; the design explicitly defers this and asks that the payoff be measured before it's built.
Scope
Phase A — run-folding (design's "intermediate step," no new execution path)
- Fold each maximal
(series, bucket)span once instead of per row, using a plan-time flag marking which key columns are index-resolved — derived fromsearchSeriesList's existing three-way projection split, never inferred at runtime by sampling column values. - Applies whenever an index-resolved tag is a group key:
COUNT_DISTINCTcollapsesn − 1redundant set inserts per span into one;COUNTbecomescount += spanLength.
Phase B — metadata-only scan (after Phase A lands)
- Bypass block decode entirely when every tag the query touches (group keys, aggregation target, any tag a residual predicate touches) resolves from the series index — gated by the range-containment guard (a block whose
[min,max]isn't fully inside the query range must still readtimestamps.bin) and the no-residual-predicate guard. index_modemeasures are the structural first case: they hold no part-resident tags at all, so an index-mode aggregation is index-only by construction.
Out of scope
- Anything that changes correctness or the query surface — this issue is pure performance, gated by differential tests against the existing (already-correct) path.
Test / Definition of done
- Phase A: differential test against the unoptimized per-row path on the same fixture (identical results, fewer group-map probes); a magnitude assertion (an 8192-row block at hour buckets collapses to ~137 spans, not 8192 key computations).
- Phase B: differential test against the decoding path across both index-mode and part-backed fixtures (identical results); the range-containment fixture — a block with rows at 09:00 and 09:59 (one hourly bucket) queried over 09:30–09:31 must yield no bucket row, while the same block fully inside the query range takes the shortcut.
- Dominant language
- Java
- Stars
- 25k
- Forks
- 6.6k
- Avg merge
- 10h 14m
- Merged PRs (30d)
- 23
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/skywalking
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
apache/skywalking#14120 ·
Maintainers usually reply within 1 day
-
[Feature] horizon ui Logs should support horizontal scrolling; too much content requires opening each entryPossibly taken @wu-sheng claimed this 6 days ago. Openfeature UI
apache/skywalking#14118 · 2 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
database
Difficulty 4/5 3-5 days Newbie friendliness 45/100
apache/skywalking#14104 ·
Maintainers usually reply within 1 day
-
[BanyanDB] Data/Schema Import and ExportPossibly taken @mrproliu claimed this 13 days ago. Openfeature
apache/skywalking#14102 · 1 assignee ·
Maintainers usually reply within 1 day
-
[Bug] BanyanDB Canopy source build fails on macOS ARM64Possibly taken @hanahmily claimed this 17 days ago. Openbug database UI
apache/skywalking#14094 · 2 comments · 1 assignee ·
Maintainers usually reply within 1 day
All issues in apache/skywalking
Similar issues
-
[destination-snowflake] Custom domains rejected unlike source connectionsPossibly taken @kuza55 claimed this today. Openautoteam community connectors/destination/snowflake team/use
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
area-dashboard
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
component/operate kind/feature-request
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
Forge coverage prompts carry text the agent cannot act onPossibly taken @graalvmbot claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
oracle/graalvm-reachability-metadata#10572 ·
Maintainers usually reply within 1 day
-
[CI] Core CI doesn't run for changes to amoro-format-lance (and amoro-web)Possibly taken @MarkAlex1234 claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Maintainers usually reply within 2 days