docs(db): explain invite repair recovery after lock timeout

Co-authored-by: Honor <e0bf479eeebe47dde1e35705212a4df70616a7bc834d907ddfb18cf0405f8b1b@seiler-test.communities.public.builderlabstaging.xyz>
Signed-off-by: Brad Seiler <seiler@squareup.com>
This commit is contained in:
Brad Seiler
2026-11-09 15:41:59 -08:00
committed by GitHub
parent 0252728a00
commit 0bbeca8d8b
2 changed files with 5 additions and 1 deletions

View File

@@ -234,7 +234,9 @@ second run must keep zero and leave revocation timestamps and markers unchanged.
The default two-minute statement timeout covers the entire repair invocation,
not each batch. A timeout preserves committed batches, rolls back the current
batch and skips the final query; it is not a successful zero check. Keep the
same writer controls in place and rerun. If scanning already repaired rows
same writer controls in place and rerun. A `lock_timeout` stop likewise keeps
committed batches; resolve lock contention and rerun under the same controls.
If scanning already repaired rows
exhausts that budget, pass a larger finite budget, for example
`psql -X -v ON_ERROR_STOP=1 -v invite_repair_timeout=10min -f scripts/maintenance/backfill_invite_revocations.sql`.
Review fenced communities separately and keep their admission closed until they

View File

@@ -15,6 +15,8 @@
-- statement_timeout bounds the entire DO invocation, including all batches;
-- COMMIT does not restart it. On timeout, committed batches remain repaired,
-- the current batch rolls back, and ON_ERROR_STOP skips the final zero check.
-- A lock_timeout stop likewise keeps committed batches; keep admission closed
-- and rerun after resolving lock contention.
-- Keep admission closed and rerun. If scanning the repaired prefix consumes
-- the budget, choose a larger finite invocation budget with psql's
-- -v invite_repair_timeout=10min (the default is 2min).