super-productivity/packages/super-sync-server/scripts
Johannes Millan 5ed1f2c5d0
fix(supersync): prevent migrator advisory-lock leak on deploy timeout (#9126)
A timed-out `docker compose run` in deploy.sh SIGTERMs the compose CLI but
can leave the migrator container (and its DB connection) running detached,
which keeps Prisma's session-level migration advisory lock held and wedges
the next deploy with P1002.

- deploy.sh: run_migrator() names each one-off migrator container from a
  single MIGRATOR_NAME_PREFIX and force-removes it (inline + $$-scoped EXIT
  sweep) so a timed-out run can't orphan it and leak the lock; add timeout -k.
- migrate-deploy.sh: recognize P1002 advisory-lock timeouts and print
  copy-paste diagnosis + cleanup guidance instead of a generic exit 1; never
  auto-terminate a backend (an active CONCURRENTLY build legitimately holds it).
- tests: P1002 fake-npx case + non-vacuous recovery test; assert the
  name/sweep-filter prefix single-source-of-truth invariant.
- env.example: document the recommended higher MIGRATION_TIMEOUT and the new
  force-remove-on-timeout behavior.
2026-07-17 20:18:54 +02:00
..
analyze-storage.ts fix(sync): preserve own vector clock counter across full-state op resets 2026-04-01 15:41:13 +02:00
backup.sh feat(sync): add backup strategy with accounts-only dump and disaster recovery docs 2026-03-18 20:15:45 +01:00
build-and-push.sh fix(sync): point manual supersync image push at super-productivity org (#7871) 2026-06-01 13:32:06 +02:00
clear-data.ts refactor(sync): remove tombstone system 2025-12-28 12:08:28 +01:00
delete-user.ts fix(superSync): Update admin scripts and README for Postgres compatibility 2025-12-12 20:48:40 +01:00
deploy.sh fix(supersync): prevent migrator advisory-lock leak on deploy timeout (#9126) 2026-07-17 20:18:54 +02:00
docker-monitor.sh feat(sync-server): add active-users-quick monitor command 2026-04-21 15:03:42 +02:00
health-alert.sh fix(sync-server): security hardening and GDPR log compliance 2026-03-18 20:48:51 +01:00
migrate-deploy.sh fix(supersync): prevent migrator advisory-lock leak on deploy timeout (#9126) 2026-07-17 20:18:54 +02:00
migrate-payload-bytes.ts perf(sync): SuperSync server speed + correctness hardening (#7621) 2026-05-15 17:24:16 +02:00
monitor.ts feat(sync-server): add active-users-quick monitor command 2026-04-21 15:03:42 +02:00
MONITORING-README.md Add active users monitoring command with engagement metrics (#6921) 2026-03-22 23:15:14 +01:00
recover-user.ts feat(super-sync-server): add recover-user data-recovery script 2026-05-22 19:18:40 +02:00
run-all-monitoring.ts fix(sync-server): use compiled JS for monitoring scripts in Docker 2026-03-27 17:33:38 +01:00