fn read_lines(
state: &AppState,
block_id: &str,
after: Option<u64>,
gen: Option<&str>,
max: usize,
) -> Result<Read, String>Expand description
The lines after after, or the tail of the transcript when after is None or no longer valid.
A line longer than a read is searched for its end, up to MAX_SCAN_BYTES, and a longer one is
skipped with a marker line, so a cursor never stops in front of a line or lands inside one.
The generation, the size and the bytes must be of one file: a swap that lands during the read would pair a position in the new file with the old generation, so the generation is read again afterwards and the read starts over when it changed.