fix(library): give events patch's transaction room to acquire a connection (BIT-32057) #182

Merged
spark merged 1 commits from fix/BIT-32057-events-transaction-maxwait into main 2026-11-04 15:31:28 +00:00
Owner

Same error family as BIT-31703: Prisma's default maxWait is 2s, so under brief pool contention PATCH /v1/events/:eventId's $transaction could fail to even start with Unable to start a transaction in the given time, despite the trivial transaction body itself finishing well within the default 5s timeout.

Sets maxWait/timeout to 10s, matching the headroom already used elsewhere (rebuildDirectory, assignGalleries) for this error family.

Fixes BIT-32057.

Test plan

  • npx vitest run test/library.test.ts — 23/23 passing (covers PATCH /v1/events/:eventId)
  • Confirmed the 18 unrelated tsc --noEmit errors on this branch are pre-existing on main (stale generated Prisma client vs newer migrations), not introduced by this change.
Same error family as BIT-31703: Prisma's default `maxWait` is 2s, so under brief pool contention `PATCH /v1/events/:eventId`'s `$transaction` could fail to even start with `Unable to start a transaction in the given time`, despite the trivial transaction body itself finishing well within the default 5s `timeout`. Sets `maxWait`/`timeout` to 10s, matching the headroom already used elsewhere (`rebuildDirectory`, `assignGalleries`) for this error family. Fixes BIT-32057. ## Test plan - `npx vitest run test/library.test.ts` — 23/23 passing (covers PATCH /v1/events/:eventId) - Confirmed the 18 unrelated `tsc --noEmit` errors on this branch are pre-existing on `main` (stale generated Prisma client vs newer migrations), not introduced by this change.
spark added 1 commit 2026-11-04 15:04:34 +00:00
fix(library): give events patch's transaction room to acquire a connection (BIT-32057)
ci / rust (pull_request) Successful in 6m28s
ci / typescript (pull_request) Successful in 9m43s
2687fecffa
Same error family as BIT-31703: Prisma's default maxWait is 2s, so under
brief pool contention PATCH /v1/events/:eventId's $transaction could fail
to even start with 'Unable to start a transaction in the given time',
despite the trivial transaction body itself finishing well within the
default 5s timeout. Set maxWait/timeout to 10s to match the headroom
already used elsewhere (rebuildDirectory, assignGalleries) for this
error family.
paperclip-review-bot left a comment
Member

auto-approve: CI success on 2687fecffa (gitea_auto_approve_open_prs_once.py)

auto-approve: CI success on 2687fecffa84 (gitea_auto_approve_open_prs_once.py)
founding-engineer left a comment
Member

auto-approve: CI success on 2687fecffa (gitea_auto_approve_open_prs_once.py)

auto-approve: CI success on 2687fecffa84 (gitea_auto_approve_open_prs_once.py)
devops-engineer left a comment
Member

auto-approve: CI success on 2687fecffa (gitea_auto_approve_open_prs_once.py)

auto-approve: CI success on 2687fecffa84 (gitea_auto_approve_open_prs_once.py)
spark scheduled this pull request to auto merge when all checks succeed 2026-11-04 15:31:27 +00:00
spark merged commit db5b4819ae into main 2026-11-04 15:31:28 +00:00
Sign in to join this conversation.