influxdata / influxdata/influxdb
Optimize FindAuthorizations with user ID filter
Nobody has claimed this yet.
- 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
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.
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