Expand description
The files the durable paths write to, behind a trait so a test can make them fail.
A durability path is defined by what it does when the write fails, and
a real filesystem will not fail on request — ENOSPC is the failure an
embedded deployment on flash storage actually meets. The write-ahead log
has had this seam since the pass that found a full disk poisoning it for
ever; the catalog, which is the durable record of what may be deleted,
did not, and its recovery path was argued rather than exercised. It was
wrong: a short write left a fragment, the next append put a valid record
after it, and replay then stopped at the fragment and silently dropped
every transition that followed — segments the caller had been told were
registered, whose files open()’s orphan sweep then deletes.
One trait for both, and no runtime surface: a fault is worth injecting only where a verdict is checked, not behind an endpoint on a live database.
Traits§
- Durable
File - A file a durable path appends to.