[Fix] Stability

This commit is contained in:
Alex 2026-07-27 20:36:23 +02:00
commit 4f7260419a
20 changed files with 563 additions and 464 deletions

View file

@ -0,0 +1,8 @@
-- A relay retry uses the original MTP request ID. Make allocation idempotent
-- for that authenticated Iota/request pair, so a lost response returns the
-- same user ID and lease rather than allocating another one.
ALTER TABLE registration_leases
-- Existing leases predate retry correlation; leave their request ID NULL
-- rather than assigning a shared sentinel that could violate uniqueness.
ADD COLUMN request_id INT UNSIGNED NULL,
ADD CONSTRAINT uk_registration_leases_iota_request UNIQUE (iota_id, request_id);