Crash Consistency and Durable Ordering

Plan persistent operations so recovery can interpret every allowed stopping point in a replacement workflow.

Source
Anbloq
Language
English
Created
Updated
Chapters
2
Reading time
1 min
In this article2 chapters
  1. Atomic visibility differs from persistence after failure
  2. Reason about each dependency in recovery order

Atomic visibility differs from persistence after failure

A file replacement can use a rename operation to make the new name appear atomically under the filesystem’s conditions. Before publishing the name, the replacement contents need to be recoverable to the level promised by the application. Sync operations for the file and directory may be needed, depending on the platform’s documented guarantees. An application-level success message should match the durability it actually requested and checked.

Reason about each dependency in recovery order

If a pointer to a new data block survives but that block’s intended contents do not, a reader sees an invalid version. Require the block to be protected before publishing the pointer, or provide recovery records sufficient to reconstruct it. Filesystem journals encode related ordering across metadata. Persistent memory studies analogous distinctions when stores can reach a persistence domain separately from ordinary visibility.[1][2]

References

  1. Remzi H. Arpaci-Dusseau and Andrea C. Arpaci-Dusseau, Operating Systems: Three Easy Pieces ↩
  2. The Open Group, POSIX fsync ↩