letsencrypt / letsencrypt/boulder
Set transaction isolation levels explicitly for certain queries
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 5.8k
- Forks
- 649
- Avg merge
- 3d 23h
- Merged PRs (30d)
- 24
Description
Right now in our DSN configuration for certain components, we set tx_isolation=READ-UNCOMMITTED:
- bad-key-revoker
- notify-mailer
- contact-auditor
- cert-checker
- expiration-mailer
- admin-revoker
That's because these make big queries which can cause locks across many rows, slowing database performance.
Rather than rely on a correctly-configured DSN for these, we should explicitly set the isolation level for the specific queries we care about. That will require turning some of these into transactions, so that we can set the isolation level for those transactions.
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 the DSN configuration and the implementations of bad-key-revoker, notify-mailer, contact-auditor, cert-checker, expiration-mailer, and admin-revoker. Identify the large queries currently relying on tx_isolation=READ-UNCOMMITTED and trace how each would use a transaction. Done means the relevant queries set their isolation level explicitly rather than relying on DSN configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- databases
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100