pub fn next_adaptive_batch_size(
current: usize,
base: usize,
under_pressure: bool,
) -> usizeExpand description
Decide the next adaptive fetch size from current pressure state.
- Under pressure: shrink to 75 %, but never below [
ADAPTIVE_MIN_BATCH]. - Otherwise: grow to 125 %, but never above the schema-chosen
baseceiling (so we recover toward the initial fetch size without overshooting it).
Pure function — exported so adaptive batch-sizing can be unit-tested without a live database.