Skip to main content

Module page

Module page 

Source
Expand description

The log page header.

07 section 4. Thirty two bytes at the front of every segment that holds log records, and its checksum covers the header only.

That last part is a decision rather than an oversight. A whole page checksum would have to be recomputed on every append, which turns an append into a read of the whole page, and the append is the commit (06 section 3). Torn tails are found by walking records instead: the len == 0 sentinel says where the writing stopped, and the per record trailer says whether what came before it survived.

Structs§

PageHeader
The header at the front of a log page.

Constants§

PAGE_HEADER_LEN
The header, in bytes. Records start here.
PAGE_MAGIC
YOLG, little endian, so it reads as those four characters in a hex dump.