Skip to main content

Module docview

Module docview 

Source
Expand description

A manifest document seen chunk by chunk (latency plan 2026-10-23, lever G, §12).

A commit changes a handful of paths, and it used to load, clone, diff and rewrite every entry of the document to do it: 4.1 s of a 6.9 s one-file publish at a million entries. A DocView holds the pointer, the tombstones and the chunk list, proves every chunk the pointer names is in the bucket (one LIST, as a full load does), and parses a chunk only when a path in it is asked for. Each parse passes the checks a full load makes (chunk::parse_chunk).

It answers “who cites this handle” without the whole document (§12, claim 2): a handle key is minted <prefix>/files/<path>@<flush>, so an entry whose key does not parse to its own path is an ALIAS (a rename’s destination, or a key of any other shape), and every entry citing a key is at the path the key names or among the aliases. Each chunk’s aliases are kept by address, chunks being immutable, so a process parses every chunk once, on its first commit.

Structs§

DocView

Enums§

CommitDocs
What a commit installed, for the steps after its CAS: the whole documents on the full path, a view and the overlay on lever G’s.
Opened
What opening a view found.

Functions§

chunk_entries
Chunk i’s entries in a document held whole: from its first key to the next chunk’s.
key_path
The path a handle key names, if it has the shape handle_key mints.
remember
Record the aliases of a whole document’s chunks, which a full load and a whole-document write hold every entry of, and keep this prefix’s cache to those chunks. A process that has loaded or written a document then answers “who cites this handle” without parsing a chunk.
retired_over
The retire set of an overlay on a document held whole (the gateway’s per-path commit, latency plan §16): DocView::retired’s rule, with every lookup in the map. A chunk whose aliases the cache lacks is scanned in the map, and remembered.

Type Aliases§

AliasCache
One workspace’s chunks’ aliases, by address (LeanConfig::alias_cache): a chunk is immutable, so its aliases never change.