Skip to main content

MAX_STORE_ID_LEN

Constant MAX_STORE_ID_LEN 

Source
pub const MAX_STORE_ID_LEN: usize = 64; // 64usize
Expand description

Upper bound on a store id, in bytes.

Store ids become path components (stores/{id}/...) and are embedded in every cause reference of every node that points across a store boundary, so they are paid for repeatedly in both inodes and bytes-on-disk. 64 is chosen to match the hash length: a qualified reference is then never more than ~2x a bare one, which keeps the worst case on a node’s caused_by bounded and predictable. It is also comfortably under the 255-byte filename limit on every filesystem we target, with room for prefixes and suffixes.