Skip to main content

MAX_RELOAD_BYTES

Constant MAX_RELOAD_BYTES 

Source
pub const MAX_RELOAD_BYTES: u64 = _; // 67_108_864u64
Expand description

The most bytes of the journal file a reload reads: 64 MiB.

The journal holds at most MAX_EVENTS events in memory, and compaction rewrites the file from what it holds, so a file kept by this executable stays far below the bound. A file beyond it was written by something else, or grew while compaction could not replace it; reading it whole would put an unbounded file into memory before a single bound is checked. A reload reads the first MAX_RELOAD_BYTES up to the last whole line, and the rest is left on disk, counted in JournalTallies::unread_bytes and named by mesh doctor — never dropped in silence, and kept by compaction.