Tearleads

container_metadata_revalidations Client SQLite table

Container metadata documents a listing showed may have moved since this client last read them, and that still owe a read. A hint lost before this client subscribed, or while it was offline, is otherwise never recovered for a clean metadata document. Written before the listing's timestamps and lane watermark advance, so a restart before the read still owes it.

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

Columns

  • document_idtext
    • primary key
    • not null

    Server id of the container metadata document owed a read.

  • advertised_update_countinteger
    • not null

    The metadata update count the listing advertised; a read settles the request only once a processed cursor covers it.

  • revisiontext
    • not null

    Replaced on every request, so a read settles only the request it saw.

  • requested_attext
    • not null

    ISO-8601 time of the latest request.

DDL

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

CREATE TABLE IF NOT EXISTS "container_metadata_revalidations" (
  "document_id" TEXT NOT NULL PRIMARY KEY,
  "advertised_update_count" INTEGER NOT NULL,
  "revision" TEXT NOT NULL,
  "requested_at" TEXT NOT NULL
);