Skip to main content

dir_name

Function dir_name 

Source
fn dir_name(
    min_ts: i64,
    max_ts: i64,
    node: u32,
    seq: u64,
    wal_hi: u64,
) -> String
Expand description

{min_ts}-{max_ts}-{node}-{seq}-{wal_hi}.

node is what makes two active replicas sharing a volume safe. Without it, two writers allocate the same seq and the second rename lands on a non-empty directory — ENOTEMPTY, and a node that can never publish again.

Splitting on - is only safe because crate::signal::Sealed clamps both timestamps non-negative; a negative one would format with a leading - and make the name unparseable, which is to say invisible to scan.