idea: XTDB's user-facing consistency and temporal guarantees should be published as an Allium spec

Aperta
#6,417 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Documentazione
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
clojure, sql
Ambito
databases

Direzione di ricerca

Start by reading about/txs-in-xtdb.md, about/dbs-in-xtdb.md, and about/time-in-xtdb.md, then compare their user-facing guarantees with dev/doc/db.allium, dev/doc/tx.allium, and allium/live-index.allium. The issue leaves the first slice and which distilled behaviours become promises for maintainers to decide. Done means a user-facing spec is checked in, its propagated tests run in CI, and the docs pages link to it.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

XTDB's user-facing consistency, transactional and temporal guarantees are stated only partially, in prose docs and inside internal implementation specs; a user-facing Allium spec, distilled from the code and published, would state them precisely and checkably.

  • Users, and agents answering on their behalf, evaluate a database by what it guarantees.
    Today's statements are prose in the docs, so a reader can't tell exactly what they may rely on, and an agent has nothing precise to cite.

  • idea: a spec with tests derived from it stays true where prose drifts.
    Allium's distill extracts a spec from a codebase, and propagate generates tests from one.

  • Opportunistic — nothing downstream waits on it.

Problem

A reader can't tell precisely which behaviours they may rely on.

Current state
  • The transactional guarantees are prose in two docs pages.
    about/txs-in-xtdb.md says writes are serialized through a totally-ordered durable log, that DML transactions are atomic and non-interactive, and that they're therefore serializable; about/dbs-in-xtdb.md says serializability holds within a database but not between databases.
    Neither is stated in a form that can be checked against the implementation.

  • The temporal and read semantics are described by example, not specified.
    about/txs-in-xtdb.md explains a read-only transaction's stable basis; about/time-in-xtdb.md explains valid and system time.
    Not stated precisely anywhere: what the await token promises for read-your-writes; FOR VALID_TIME and FOR SYSTEM_TIME behaviour under corrections, deletes and erasure; what one basis means across databases joined with ATTACH DATABASE.

  • The Allium specs that already exist specify the implementation, for maintainers.
    dev/doc/db.allium, dev/doc/tx.allium, allium/live-index.allium and others carry some user-visible guarantees — db.allium's ExecutionReadsOneSnapshot, for one — interleaved with internal mechanism, so a user can't read the contract off them.
    Gaps in the user-visible semantics surface as bugs instead, e.g. #6232, a handed-on await token letting its receiver read behind what its sender saw.

  • Behaviour and guarantee aren't separated.
    Anything a user observes beyond those pages reads exactly like a commitment, so a user can build on an incidental behaviour.

Probably wants: the spec checked into the repo, its propagated tests running in CI, and the docs pages linking it — not yet designed.

Out of scope

  • Not a spec of the implementation.
    It states the observable contract; how the indexer, compactor or log achieve it stays in the existing internal specs, so this one survives their redesign.

  • Not a Jepsen-style test campaign.
    Tests propagated from the spec check XTDB against it; adversarial fault-injection testing is separate work.

Open questions

  • Q1 Which distilled behaviours do we promise?
    distill reports what the code does; publishing makes it a contract, so each behaviour needs a keep-as-guarantee or leave-unspecified call from the maintainers.

  • Q2 Is the first slice the transactional guarantees or the temporal ones?
    Transactional ones already have prose to check the spec against; temporal ones have the least written down.

Lingua principale
Clojure
Stelle
3.1k
Fork
193
Merge medio
1g 8h
PR unite (30g)
73

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di xtdb/xtdb

Tutte le issue di xtdb/xtdb

Issue simili

Altre issue su Clojure

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.