Skip to main content

MAX_DOC_BYTES

Constant MAX_DOC_BYTES 

Source
pub const MAX_DOC_BYTES: usize = _ /* 1_048_576usize */;
Expand description

Hard cap on the compacted encoding of one document, 1 MiB.

The physical ceiling is the sealed protocol-state record (4 MiB). The working budget is a quarter of it, and the gap is not slack: it absorbs the delta log accumulating between compactions, seal and framing overhead, and the growth between the write that breaches the cap and the next compaction pass. A document that only checked itself against the physical ceiling would become unpersistable while the user was still typing into it.