[Fix] Stability
This commit is contained in:
parent
fa0af21af5
commit
4f7260419a
20 changed files with 563 additions and 464 deletions
8
migrations/003_registration_lease_request_id.sql
Normal file
8
migrations/003_registration_lease_request_id.sql
Normal 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);
|
||||
Loading…
Reference in a new issue