Skip to content

Commit 3ad2f08

Browse files
committed
fix(warden): add retry queue for failed authorization tuple writes
Project ownership tuples were silently dropped when Warden was unavailable. Add a DB-backed retry queue with exponential backoff to ensure tuples are eventually written.
1 parent 71b0983 commit 3ad2f08

12 files changed

Lines changed: 1689 additions & 33 deletions

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
CREATE TABLE "warden_sync_queue" (
2+
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
3+
"operation" text NOT NULL,
4+
"payload" jsonb NOT NULL,
5+
"attempts" integer DEFAULT 0 NOT NULL,
6+
"max_attempts" integer DEFAULT 10 NOT NULL,
7+
"last_error" text,
8+
"next_retry_at" timestamp(6) with time zone DEFAULT now() NOT NULL,
9+
"created_at" timestamp(6) with time zone DEFAULT now() NOT NULL
10+
);
11+
--> statement-breakpoint
12+
CREATE INDEX "warden_sync_queue_next_retry_idx" ON "warden_sync_queue" USING btree ("next_retry_at");

0 commit comments

Comments
 (0)