8000 docs(durability): small-transaction WAL statements contradict the large-transaction path · Issue #941 · project-minigraf/minigraf · GitHub
[go: up one dir, main page]

Skip to content

docs(durability): small-transaction WAL statements contradict the large-transaction path #941

Done

Description

@adityamukho

docs/DURABILITY.md (v3) states the small-transaction model as if it were universal, and contradicts its own large-transaction paragraph:

  • Line 16: "Each call is one WAL entry, so a transaction is never a…"
  • Line 24: with wal_checkpoint_threshold(usize::MAX), "only checkpoint() writes app.graph, and the WAL holds everything else."
  • Line 42: SyncMode::Normal "writes the WAL entry with no sync…"
  • Line 44: "several execute() calls and one commit() write one WAL entry with one sync, in either mode."
  • Line 53: "A large transaction (more facts than transaction_chunk_facts) commits as a checkpoint, with no WAL entry…", which also writes app.graph regardless of the threshold.

docs/CONFIGURATION.md:25 documents large transactions as always durable, consistent with line 53.

Fix: qualify lines 16, 24, 42 and 44 as the ordinary (below transaction_chunk_facts) path, and link the large-transaction exception, including what a rolled-back large transaction may have physically written. This is the operations guide for "where data loss matters", so it should be exact.

Found by the independent Codex review, confirmed.

Activity

  1. added this to the v3.0.0 milestone on Nov 29, 2026
  2. added
    documentation
    durability
    on Nov 29, 2026
  3. adityamukho commented on Nov 30, 2026

    @adityamukho
    CollaboratorAuthor

    Related decision from #928: PHILOSOPHY.md §7 stands — a format change never ships in a minor or patch release. The "Within v3" paragraph (docs/DURABILITY.md:275 on v3) says a later v3.x may add an optional on-disk structure that an older v3.x refuses with STG-034. That is a format change in a minor release by §7's definition ("an older release could not read correctly"), so rewrite it in this fix: every 3.x release reads and writes files every other 3.x release can read, and the v8 format is frozen from the 3.0.0-alpha. Keep STG-034 described as the guard against a file from a future major.

  4. adityamukho commented on Nov 30, 2026

    @adityamukho
    CollaboratorAuthor

    Precision on the last line above: STG-034 fires when the meta page's required_features has bits this version doesn't know. Under §7 no 3.x minor or patch may set a new required bit, and a future major bumps the header version instead, so describe STG-034 as a defensive check that a released 3.x should never hit. docs/ERROR_REFERENCE.md:2995 ("A newer Minigraf v3.x release wrote structures this version cannot read") needs the same rewording; error codes are never removed, so keep the code.

  5. added a commit that references this issue on Nov 30, 2026
  6. adityamukho commented on Nov 30, 2026

    @adityamukho
    CollaboratorAuthor

    Done in #953 (merged on v3).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationdurability

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0