Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[Feature] BanyanDB: local-scan performance follow-up for tag aggregation (optional)

Open
#14,092 0 comments 0 reactions 0 assignees View on GitHub

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

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

database feature

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 from searchSeriesList'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_DISTINCT collapses n − 1 redundant set inserts per span into one; COUNT becomes count += 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 read timestamps.bin) and the no-residual-predicate guard.
  • index_mode measures 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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/skywalking

All issues in apache/skywalking

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.