From bd51fef5ccf686a8d2c012a8b376974839fbd205 Mon Sep 17 00:00:00 2001 From: Julius Joska Date: Tue, 29 Sep 2026 18:30:11 +0200 Subject: [PATCH] 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. --- rust/sepot-relay/migrations/0003_queue_attempt_count.sql | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 rust/sepot-relay/migrations/0003_queue_attempt_count.sql diff --git a/rust/sepot-relay/migrations/0003_queue_attempt_count.sql b/rust/sepot-relay/migrations/0003_queue_attempt_count.sql new file mode 100644 index 0000000..132ebc6 --- /dev/null +++ b/rust/sepot-relay/migrations/0003_queue_attempt_count.sql @@ -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;