NotesStorage system crashes

Storage system crashes

While data loss may be unavoidable in some cases, the structure of Condensation stores makes it fairly resilient to storage system crashes, even without explicit journaling.

Partially written objects

If the system crashes while an object is being written, the SHA-256 hash of this last, partially written object will almost certainly be wrong. Hence, the object will be discarded.

Partially added hashes

If the system crashes while an envelope hash is being added, the partially written hash will almost certainly be dangling, i.e. point to an object not available on the store. Such entries are invalid, and will be discarded.

Partially removed hashes

Similarly, if the system crashes while an envelope hash is being removed, the partially destroyed hash will almost certainly be dangling, and therefore be discarded.

Transactions

A transaction is carried out by writing new objects, adding the new hash, and removing all merged hashes. These operations are carried out in this order, and only if all previous operations have succeeded.

If the system crashes during such a transaction, the following outcomes are possible: