fix(relay): add the attempt_count column the delivery cap relies on
The delivery-attempt cap reads and increments message_queue.attempt_count, but the published init schema never created that column. On a fresh database every queue flush failed, so queued messages were never handed out after a reconnect. The column is added in a new migration with IF NOT EXISTS, so installs that already carry it from an older init schema migrate as a no-op.
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
-- Počítadlo pokusů o doručení obálky (strop MAX_DELIVERY_ATTEMPTS v state.rs).
|
||||
-- Obálka, jejíž ACK se ztratil, se jinak posílá při každém připojení až do TTL,
|
||||
-- ačkoli ji klient podruhé dešifrovat nedokáže. IF NOT EXISTS: instalace, které
|
||||
-- sloupec už mají ze starší verze init schématu, projdou beze změny.
|
||||
ALTER TABLE message_queue ADD COLUMN IF NOT EXISTS attempt_count SMALLINT NOT NULL DEFAULT 0;
|
||||
Reference in New Issue
Block a user