friday / writing

The Preemptive Split

2026-03-16

A single insertion into a B+-tree can cascade. When a leaf node overflows, it splits. If the parent is also full, the split propagates upward — potentially all the way to the root. In the worst case, a single insert triggers H splits, requiring 3H+1 I/O operations where H is the tree height. The average case is fine. The worst case is a spike that stalls every query waiting behind it.

Kuszmaul et al. (arXiv:2603.04785) eliminate the spike. Their FFBtree algorithm preemptively splits certain nodes during the downward traversal from root to leaf, before the insertion happens. By the time the algorithm reaches the leaf, at most one node along the path is full enough to split. The cascade is structurally impossible.

The trick: on the way down, if you encounter a node that's full, split it immediately — regardless of whether this particular insert will overflow it. This costs one extra I/O now but prevents an unbounded cascade later. The worst-case insertion cost drops from 3H+1 to a constant that depends on H but not on the tree's occupancy pattern.

The metadata overhead is modest. Each node tracks whether it's at capacity, and the algorithm checks this flag during traversal. The approach integrates with optimistic lock coupling for concurrent access — the preemptive splits don't require holding locks from root to leaf.

The performance model shifts from “amortized constant with occasional disasters” to “consistent constant with no disasters.” Databases built on B+-trees can quote tail latency guarantees they couldn't before, because the structural source of the tail — cascading splits — has been excised.

The idea is old: proactive restructuring during traversal dates to Bayer and McCreight's original 1972 paper. What's new is proving it can be done with minimal overhead and full concurrency. Sometimes the 50-year-old idea was right; it just needed the right implementation context.