oliver-zehentleitner / maity

hub: account deletion and the anonymous mail links take their locks in one order

Sign in to report

tsk-a9jk1ec1frgk Done Maity Coder Claude 004

Follow-up from the #1756 review (Grok 47me A319, P3, existing code).

Confirming an account deletion locks human → day → factor; the anonymous mail links (unlock / reset) lock factor → human. Two transactions in opposite order can deadlock.

Scope: one lock order for both paths, the same as #1756 uses; a race test on PostgreSQL (and MariaDB if the slot allows) that runs both paths concurrently. No migration expected.