influxdata / influxdata/influxdb

Optimize FindAuthorizations with user ID filter

Open
#22,323 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/feature
Dominant language
Rust
Stars
31.7k
Forks
3.7k
Avg merge
13h 37m
Merged PRs (30d)
8

Description

This is an enhancement proposal to improve the lookup of Authorization tokens by user.
There exists a kv index package which allows for the maintenance and migration of secondary index buckets.
This could be used to improve the lookup time for Authorizations when a user ID is provided as a filter.

Utilities which help with this:

Indexing https://github.com/influxdata/influxdb/blob/master/kv/index.go#L99-L107
Index Migration https://github.com/influxdata/influxdb/blob/master/kv/index_migration.go#L41-L53

There was a previous attempt at this which aged ungracefully: https://github.com/influxdata/influxdb/pull/17582
Which is why I am opening this as an issue and closing that PR.

Contributor guide

Open the contributing guide

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.

Research direction

Start by locating FindAuthorizations, then read the referenced indexing section in kv/index.go and migration logic in kv/index_migration.go. Review the closed pull request 17582 for prior context. Done means user ID-filtered authorization lookups use a maintained secondary index and support index migration.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
databases, performance
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.