letsencrypt / letsencrypt/boulder

Improve DB performance of bad-key-revoker

Open
#5,706 0 comments 1 reaction 0 assignees View on GitHub

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

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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.