Skip to main content

fixed_state

Function fixed_state 

Source
pub fn fixed_state() -> RandomState
Expand description

A fixed-seed ahash::RandomState.

We fix the seeds explicitly rather than letting ahash randomize per process so that hashing is deterministic across runs, replicas, and — crucially — across builds that select ahash’s compile-time features differently. Cargo unions features across the workspace, so a RandomState::new() could pick a different hasher depending on what other dependencies enable; pinning the seeds avoids that. The seeds are the ones ahash::AHasher::default() would use. (Depending on target features ahash may fall back to its non-AES hasher, which is still sufficient for our needs.)

Used wherever Materialize needs a stable hash: distributing data to workers during consolidation (crate::operator) and the per-column codec summaries in mz_row_spine.