Skip to main content

shard_of

Function shard_of 

Source
pub fn shard_of(key: &RecordKey, shards: NonZeroU16) -> u16
Expand description

Which shard key belongs to.

Uses blake3 via [ContentHash] rather than std::hash::DefaultHasher, whose output is explicitly not stable across releases — a drift there would silently strand every vector in every existing index.