pub(crate) fn read_via_index(
fs: &FileStore,
zone: &str,
offset: u64,
limit: u64,
) -> Option<IndexedRead>Expand description
Read lines [offset, offset + limit) of output through a fresh
output.idx, with the freshness check, the index entries and the output
bytes all from ONE database snapshot (Codex on #3634): validating in one
read and fetching entries and bytes in later ones would let another srv
instance replace output and rebuild the index in between — the answer
would mix the new file’s lines with the old file’s total.
None when the index doesn’t describe output in that snapshot (missing,
stale, another generation’s) or a read hits bytes not stored yet: the
caller rebuilds the index and retries once, or takes its slow path.