letsencrypt / letsencrypt/boulder

Set transaction isolation levels explicitly for certain queries

Open
#7,011 0 comments 0 reactions 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

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

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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.