fix: keep migration lock timeout below the app statement timeout

With lock_timeout equal to statement_timeout (5 s) every request queued
behind a migration waiting for its lock failed with 503 together with
the migration. A 2 s lock timeout lets the queue proceed once the
migration gives up.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-11 01:38:10 +03:00
co-authored by Claude Opus 5.5
parent 5e102e6d0c
commit 84161c033a
6 changed files with 62 additions and 18 deletions
+6
View File
@@ -189,6 +189,12 @@ Evidence снимается с закоммиченного кода: комми
а не `run --rm`), `bench.md` (отказ профиля без `UP`), дельта
`load-balancing`, `REPORT.md`, скилл. Проверка: `make lint`, `dash -n`,
`openspec validate rolling-update --strict`, коммит кода.
- [x] 7.1a `lock_timeout` ревизии `e656d6bbe1a4` — 2 с вместо 5 с (меньше
`statement_timeout` приложения): при 5 с запросы в очереди за
миграцией получали 503 вместе с её отказом. Дельта `db-migrations`,
`migrations.md`, design (решения 7 и 12), `REPORT.md`. Проверка:
случай «миграция не получила блокировку» под нагрузкой — 0 ошибок,
коммит кода.
- [ ] 7.2 Evidence на итоговом commit кода:
- `compatibility.md` — шаги A–G заново, с журналом остановки старых
реплик, `--dry-run` после отката и жизненным циклом стенда после