Skip to content

Conversation

@VarshaUN
Copy link

Which issue(s) does the PR fix: #16889

Does this PR introduce a user-facing change?

NONE

Adds optional prefix parameter to PostingsForLabelMatching for faster prefix-based label queries (e.g. {code=~"5.."}).

  • Binary search to jump to first matching value
  • Early termination when prefix no longer matches
  • Updated interface, block/head/OOO readers, all call sites & tests
  • Regenerated PromQL parser (make parser)

Prefix is ignored in in-memory (head/MemPostings) for now.

Fixes #16889

Signed-off-by : Varsha U N varshaun58@gmail.com

Signed-off-by: Varsha U N <varshaun58@gmail.com>

tsdb/index:resolve any conflicts

Signed-off-by : Varsha U N <varshaun58@gmail.com>
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.

tsdb: use Matcher.Prefix() when traversing on-disk block postings offset table

1 participant