Postgres killed a pooled client mid-query (a restart, pg_terminate_backend, SQLSTATE 57P01) and surfaced it as a PrismaClientKnownRequestError (P2039 wrapping Database error. Code: 57P01) inside findFixture -> eventOf -> rematch, and again in takeOffFutureGames. Both loops already stopped the batch on an unreachable database (P1001/57P03, BIT-32462/BIT-32469) but logged a warn per folder for 57P01, which paged the error loop for a transient blip.
Fix
Treat isPostgresAdminShutdown (57P01 / "terminating connection due to administrator command") the same way as an unreachable database in both loops: log at info, stop the batch, and let the next verifyAll retry once the pool reclaims a fresh client.
Tests
rematch: logs at info and stops the batch on 57P01 (BIT-32473)
takeOffFutureGames: logs at info and stops the batch on 57P01 (BIT-32473)
Existing P1001/P2010/57P03 and real-error cases still pass
## BIT-32473
Postgres killed a pooled client mid-query (a restart, `pg_terminate_backend`, SQLSTATE `57P01`) and surfaced it as a `PrismaClientKnownRequestError` (`P2039` wrapping `Database error. Code: 57P01`) inside `findFixture -> eventOf -> rematch`, and again in `takeOffFutureGames`. Both loops already stopped the batch on an unreachable database (P1001/57P03, BIT-32462/BIT-32469) but logged a `warn` per folder for `57P01`, which paged the error loop for a transient blip.
## Fix
Treat `isPostgresAdminShutdown` (57P01 / "terminating connection due to administrator command") the same way as an unreachable database in both loops: log at `info`, stop the batch, and let the next `verifyAll` retry once the pool reclaims a fresh client.
## Tests
- `rematch`: logs at info and stops the batch on 57P01 (BIT-32473)
- `takeOffFutureGames`: logs at info and stops the batch on 57P01 (BIT-32473)
- Existing P1001/P2010/57P03 and real-error cases still pass
Paperclip-Issue: BIT-32473
Paperclip-Cluster: 53d4888f9b94
Postgres killing a pooled client mid-query (a restart, pg_terminate_backend,
SQLSTATE 57P01) surfaced as a PrismaClientKnownRequestError (P2039 wrapping
'Database error. Code: 57P01') inside findFixture -> eventOf -> rematch, and
again in takeOffFutureGames. Both loops already stopped the batch on an
unreachable database (P1001/57P03, BIT-32462/BIT-32469) but logged a warn per
folder for 57P01, which paged the error loop for a transient blip.
Treat isPostgresAdminShutdown the same way: log at info, stop the batch, and
let the next verifyAll retry once the pool reclaims a fresh client.
Paperclip-Issue: BIT-32473
Paperclip-Cluster: 53d4888f9b94
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
BIT-32473
Postgres killed a pooled client mid-query (a restart,
pg_terminate_backend, SQLSTATE57P01) and surfaced it as aPrismaClientKnownRequestError(P2039wrappingDatabase error. Code: 57P01) insidefindFixture -> eventOf -> rematch, and again intakeOffFutureGames. Both loops already stopped the batch on an unreachable database (P1001/57P03, BIT-32462/BIT-32469) but logged awarnper folder for57P01, which paged the error loop for a transient blip.Fix
Treat
isPostgresAdminShutdown(57P01 / "terminating connection due to administrator command") the same way as an unreachable database in both loops: log atinfo, stop the batch, and let the nextverifyAllretry once the pool reclaims a fresh client.Tests
rematch: logs at info and stops the batch on 57P01 (BIT-32473)takeOffFutureGames: logs at info and stops the batch on 57P01 (BIT-32473)Paperclip-Issue: BIT-32473
Paperclip-Cluster: 53d4888f9b94
auto-approve: CI success on
03fdba9557(gitea_auto_approve_open_prs_once.py)auto-approve: CI success on
03fdba9557(gitea_auto_approve_open_prs_once.py)auto-approve: CI success on
03fdba9557(gitea_auto_approve_open_prs_once.py)