Repository navigation
WPB-22970: migrate activation-keys to PostGreSQL - #5417
blackheaven wants to merge 4 commits into
Conversation
akshaymankar
left a comment
There was a problem hiding this comment.
Do the expired codes somehow automatically get cleaned up from postgres? I couldn't see anything like that. Perhaps we should run a scheduled job to clean them up nightly or something.
a8abee9 to
b065da8
Compare
ad3611f to
9169072
Compare
9169072 to
af1c784
Compare
af1c784 to
cb02426
Compare
cb02426 to
693e0da
Compare
693e0da to
f16d1ad
Compare
93d7c04 to
5e8ee21
Compare
|
Expired activation keys are cleaned by the background-worker nightly job ( |
0f84ff2 to
c9013b5
Compare
c9013b5 to
fa92d9a
Compare
fa92d9a to
1eae9a8
Compare
|
@akshaymankar FYI, data migration have been removed to speed up the support of PostGreSQL, feel free to have a look at it when you have some time, thanks in advance. |
288d4a3 to
4483750
Compare
|
@akshaymankar correction to my comment above: the activation-keys cleanup is no longer a background-worker job. Migration |
8f1db12 to
cc9ee94
Compare
Squashed onto develop. Expired activation keys are deleted by the expire-activation-keys Arbiter cron job (expirations queue) in background-worker instead of pg_cron.
cc9ee94 to
ee66b92
Compare
Run the batch loop in a single interpreter, give the tag enum its own schema name and re-check expiry in the outer DELETE.
… failure Log and fail the Arbiter job with a short category (connection error, session error with its SQLSTATE, pool acquisition timeout) instead of the rendered hasql UsageError, which carries the host, port, user and database name. The job is failed with throwRetryable so Arbiter still retries it.
Move the pool usage error redaction (CleanupFailure, classifyUsageError, renderCleanupFailure, cleanupFailedMessage) into Wire.UsageErrorRedaction and use it where background-worker turned a UsageError into text: the effect runner of adminless, background and meetings cleanup jobs no longer embeds `show` of the error, and the meetings cleanup log no longer shows the text again. Extract runCleanupWith from runExpirationsCleanup and test that it logs and throws only the redacted category, test the effect runner's mapping, and make the redaction property assert that rendering ignores the error's free-form text.
https://wearezeta.atlassian.net/browse/WPB-22970
Checklist
changelog.d