boulder
boulder copied to clipboard
Set transaction isolation levels explicitly for certain queries
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.