Hacker News new | ask | show | jobs
by JulianMorrison 5518 days ago
Writes being lost means what, a trashed file? Or merely an incomplete one?
1 comments

Merely an incomplete one. Leveldb never writes in place: it always appends to a log file, or merges existing files together to produce new ones. So an OS crash will cause a partially written log record (or a few partially written log records). Leveldb recovery code uses checksums to detect this and will skip the incomplete records.