Skip to content

Conversation

@cpu
Copy link
Contributor

@cpu cpu commented Oct 6, 2016

The "20160817143417_AddCertStatusNotAfter.sql" db migration adds a "notAfter" column to the certificateStatus database table. This field duplicates the contents of the certificates table "expires" column. This enables performance improvements (see #1864) for both the ocsp-updater and the expiration-mailer utilities.

Since existing rows will have a NULL value in the new field the notafter-backfill utility exists to perform a one-time update of the existing certificateStatus rows to set their notAfter column based on the data that exists in the certificates table.

This follows on #2177 and requires that the migration be applied & the feature flag set accordingly before use.

Fixes #2237.

Copy link
Contributor

@jsha jsha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Merging with one review because this has already been reviewed in #2132.

@jsha jsha merged commit 83e7136 into master Oct 11, 2016
@jsha jsha deleted the cpu-tasty-databass-two branch October 11, 2016 21:38
jsha pushed a commit that referenced this pull request Dec 15, 2016
Following on to #2177 and #2227 this PR adds code to the `ocsp-updater` that takes advantage of the migrations & backfill from the previous optimization PRs.

This has the primary effect of removing the `JOIN` on the `certificates` table in the `findStaleOCSPResponses` query. We expect this to be a big win in terms of query performance.

The `ocsp-updater` is also updated to opportunistically fill in the newly added `isExpired` field of the `CertificateStatus` table as it encounters rows that aren't marked as expired but correspond to an expired certificate.

Resolves #2238 and #2239
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants