Skip to main content

MAX_BTREE_DEPTH

Constant MAX_BTREE_DEPTH 

Source
pub const MAX_BTREE_DEPTH: usize = 32;
Expand description

Maximum B+tree depth.

At fanout ≥ 4 a 32-level tree holds 2^64 entries, which exceeds the page-id space. The bound exists so Rule 1 tree traversals always terminate; a tree that somehow grew past 32 levels surfaces as Error::BTreeDepthExceeded rather than a stack overflow.

crate link target above is documented as power-of-ten.md Rule 1: no unbounded recursion.