Skip to main content

read_bytes_exact

Function read_bytes_exact 

Source
pub(super) fn read_bytes_exact(
    conn: &Connection,
    zone_id: &str,
    name: &str,
    offset: i64,
    len: i64,
) -> Result<Option<Vec<u8>>, StoreError>
Expand description

read_bytes, but None if any byte of the range is not actually stored — a part missing inside the size the file claims. That is a file mid-write by a build without transactions (it raises size before inserting parts, Codex on #3631); the counter must never count bytes that read as zeros only because they aren’t there yet.