Skip to content

storage: add per-page checksums to fact pages and B+tree pages (file format v8) #388

Closed

Description

@adityamukho

Problem

Only the header has a checksum. src/storage/packed_pages.rs and src/storage/btree_v6.rs store no checksum per page. A torn write, a bad sector, or a bug that writes to the wrong page stays hidden until:

SQLite, LMDB and most embedded stores check each page when they read it, or offer an option to.

Ask

Philosophy check

Aligned: reliability over features, single file. The cost is 4 bytes per 4 KB page and one CRC per page read.

Activity

  1. added this to the v3.0.0 milestone on Sep 26, 2026
  2. added a commit that references this issue on Oct 6, 2026
  3. adityamukho commented on Oct 6, 2026

    @adityamukho
    CollaboratorAuthor

    Done on v3 in #444. Every non-meta page carries a CRC32, its own page id and its generation, checked on every read (STG-029/030/031), and the meta pages carry a whole-page CRC. #452 adds tests showing that a damaged leaf, internal node, dictionary page, value page or free-list page fails the read or checkpoint that reaches it.

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

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions