fix(archive): retry dropIfEmpty deadlock (BIT-32041) #173

Merged
spark merged 1 commits from fix/BIT-32041-drop-if-empty-deadlock into main 2026-11-03 23:19:50 +00:00
1 Commits
Author SHA1 Message Date
paula-alves 34aa567741 fix(archive): retry dropIfEmpty's delete on a Postgres write-conflict deadlock (BIT-32041)
ci / rust (pull_request) Successful in 4m11s
ci / typescript (pull_request) Successful in 7m52s
Two folders settling on the same old event at once could deadlock the
conditional deleteMany in ArchiveService.dropIfEmpty. The delete is
idempotent (gated by its own WHERE), so retrying immediately on P2034
finishes the cleanup instead of leaving an orphaned empty event behind.
2026-11-03 23:04:27 +00:00