letsencrypt / letsencrypt/boulder
Improve DB performance of bad-key-revoker
Open
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 5.8k
- Forks
- 649
- Avg merge
- 3d 23h
- Merged PRs (30d)
- 24
Description
In findUnrevoked, we should use rows.Scan to stream rows rather than reading them all in one go. We should also remove the ORDER BY and LIMIT. Instead of those, we should instead let the database do its work of building a temporary table of our results, and then work our way through it.
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
Locate findUnrevoked and inspect how it currently retrieves database rows. Confirm the change by ensuring rows are scanned incrementally and the query no longer uses ORDER BY or LIMIT, while preserving the intended result set.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- databases
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100