Tearleads

container_document_tombstone_holds Client SQLite table

Listing tombstones held back for lack of signed evidence.

Declared in packages/client-sdk/src/data/sqlite/schema/containerDocumentTombstoneHoldSchema.ts

Description

A container listing names (documentId, containerId) pairs the server says are no longer linked. The pair is only removed from documentContainerProjection once the document's verified head link-set manifest omits the container. While that evidence is unavailable (the head cannot be fetched, or the requester no longer reads the document) the pair is held here instead: the row stays, the placement is hidden from container views, and the next discovery of the container retries verification. A verified head that still links the container clears hidden, but retains the retry because that head may lag the listing. A later head that omits it applies the removal. All hidden placements remain available through orphan recovery.

Indexes:

  • (documentId, containerId) is the primary key: one hold per placement.

Columns

  • document_idtext
    • not null

    Server document id the tombstone names.

  • container_idtext
    • not null

    Container the tombstone would unlink the document from.

  • tombstoned_attext
    • not null

    Server timestamp carried by the tombstone.

  • attemptsinteger
    • not null
    • default 1

    Verification attempts so far; the retry backoff grows with it.

  • hiddeninteger
    • not null
    • default 1

    False when signed evidence still links this placement.

  • updated_attext
    • not null

    Local timestamp of the last hold or retry.

Keys and constraints

  • Primary key(document_id, container_id)

Indexes

  • container_document_tombstone_holds_container_idx(container_id, document_id)

    DDL

    The statements the client runs to create this table and its indexes.

    CREATE TABLE IF NOT EXISTS "container_document_tombstone_holds" (
      "document_id" TEXT NOT NULL,
      "container_id" TEXT NOT NULL,
      "tombstoned_at" TEXT NOT NULL,
      "attempts" INTEGER NOT NULL DEFAULT 1,
      "hidden" INTEGER NOT NULL DEFAULT 1,
      "updated_at" TEXT NOT NULL,
      PRIMARY KEY ("document_id", "container_id")
    );
    
    CREATE INDEX IF NOT EXISTS "container_document_tombstone_holds_container_idx" ON "container_document_tombstone_holds" ("container_id", "document_id");