pub fn cut_page_segments<T>(
pages: &[T],
pgno_of: impl Fn(&T) -> u32,
) -> Vec<(u32, &[T])>Expand description
Cuts pages into shard-aligned segments, each spanning at most COMMIT_SEGMENT_MAX_SHARDS.
Shard alignment remains part of the existing wire protocol; the server now writes these pages into one ordinary SQLite file through FS transactions.
pages must be sorted ascending by page number; the caller sorts once rather than this sorting
per call.