dormant_metadata_sweep_requests Client SQLite table
Durable request for a post-access-restoration crawl and sweep. Attempt state enforces exponential backoff and a bounded retry budget across restarts.
Declared in packages/client-sdk/src/data/sqlite/schema/containerSchema.ts
Columns
organization_idtext- not null
Organization to sweep: one that still has
dormantContainerMetadatarows when the request is made.requester_user_idtext- not null
Signed-in user who requested the sweep; each user runs their own.
generationinteger- not null
- default 1
Request counter: 1 at first, raised by each new request, which also resets the attempts. Claims and completion match it, so a stale run cannot settle a newer request.
attempt_countinteger- not null
- default 0
Attempts claimed for this generation. Retries back off exponentially from one minute up to 15 minutes; at 5 the request is retired and the metadata stays dormant.
last_attempted_attext- nullable
ISO-8601 time of the latest claimed attempt; null before the first.
requested_attext- not null
ISO-8601 time of the latest request.
Keys and constraints
- Primary key
(organization_id, requester_user_id)
DDL
The statements the client runs to create this table and its indexes.
CREATE TABLE IF NOT EXISTS "dormant_metadata_sweep_requests" (
"organization_id" TEXT NOT NULL,
"requester_user_id" TEXT NOT NULL,
"generation" INTEGER NOT NULL DEFAULT 1,
"attempt_count" INTEGER NOT NULL DEFAULT 0,
"last_attempted_at" TEXT,
"requested_at" TEXT NOT NULL,
PRIMARY KEY ("organization_id", "requester_user_id")
);