Tearleads

document_peer_preemptions Client SQLite table

Served updates this device voided because they reused ids of operations it holds under its own peer id with other operations: their writer committed operations as this device, and a reader that judged that update before this device's own voids this device's. A notice outlives its void row and is reported once, when written.

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

Columns

  • app_kindtext
    • not null

    Document scope and server document.

  • local_idtext
    • not null

    Document scope and server document.

  • document_idtext
    • not null

    Document scope and server document.

  • update_idtext
    • not null

    The update that reused this device's operation ids.

  • peer_idtext
    • not null

    This device's peer id it reused.

  • writer_user_idtext
    • nullable

    Who signed that update, when the served write header said.

  • author_fingerprinttext
    • nullable

    Who signed that update, when the served write header said.

  • noticed_attext
    • not null

    When this device first voided it.

Keys and constraints

  • Primary key(app_kind, local_id, update_id)

DDL

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

CREATE TABLE IF NOT EXISTS "document_peer_preemptions" (
  "app_kind" TEXT NOT NULL,
  "local_id" TEXT NOT NULL,
  "document_id" TEXT NOT NULL,
  "update_id" TEXT NOT NULL,
  "peer_id" TEXT NOT NULL,
  "writer_user_id" TEXT,
  "author_fingerprint" TEXT,
  "noticed_at" TEXT NOT NULL,
  PRIMARY KEY ("app_kind", "local_id", "update_id")
);