influxdata / influxdata/influxdb
Tech debt: refactor influxd's "run" method for better readability / testability
- Dominant language
- Rust
- Stars
- 31.7k
- Forks
- 3.7k
- Avg merge
- 13h 37m
- Merged PRs (30d)
- 8
Description
influxd's [`run` method](https://github.com/influxdata/influxdb/blob/master/cmd/influxd/launcher/launcher.go#L658) is ~800 lines long. This makes it very hard to tell how different pieces of the DB interact with and depend on one another during setup, especially when using middleware that doesn't affect types (i.e. applying an authorization wrapper).
It should be possible to refactor `run` into smaller pieces and make it easier to understand.
Contributor guide
Research direction
Start with cmd/influxd/launcher/launcher.go and the run method around line 658. Trace its setup flow and the interactions among the database components and middleware, then split the method into smaller pieces. Done means the setup is easier to understand and the refactored pieces are easier to test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend, databases
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100