Skip to main content

read_chunk_count

Function read_chunk_count 

Source
fn read_chunk_count(field_key: &str) -> Result<usize, StoreError>
Expand description

Ok(0) means the :count entry genuinely doesn’t exist (field never written under the chunked layout). Err means the read itself failed — reagent P1: a prior version of this collapsed both into the same 0, which muxbus_clear used to bound its per-field deletion loop (for i in 0..count) — a transient read failure made that loop delete NOTHING, while the field’s :count key was still deleted unconditionally right after, so logout appeared to succeed while the real token chunks were silently orphaned in the OS keychain. Callers must not treat Err as “0 chunks.”