drupflare/worker - v1.0.0
    Preparing search index...

    Function readHeapSnapshot

    • Reads a snapshot back and rebuilds the heap.

      The digest is verified and a mismatch REFUSES. That check is the whole reason the digest is stored: a heap that is the right length and the wrong bytes restores cleanly and then renders something subtly wrong, which is this project's signature failure. Refusing costs one boot; accepting costs a silently incorrect site.

      ORDER BY seq is belt and braces -- joinChunks sorts and checks for gaps anyway, because SQLite makes no promise about row order and an out-of-order join produces a right-length, wrong-content heap.

      Parameters

      • sql: HeapSql
      • opts: { generation?: string } = {}

      Returns { heap: Uint8Array; meta: SnapshotMeta; streams: StreamRecord[] } | null