Re:LevelDB: a fast and lightweight key/value database library
by jedc on Sunday May 08, 2011 @01:47PM
(#2526357)
Welcome to HN commenting, Sanjay!
(For those that aren't familiar, his bio is here: http://research.google.com/people/sanjay/index.html)
Re:LevelDB: a fast and lightweight key/value database library
by JulianMorrison on Sunday May 08, 2011 @05:29PM
(#2526758)
Writes being lost means what, a trashed file? Or merely an incomplete one?
Re:LevelDB: a fast and lightweight key/value database library
by sghemawat on Sunday May 08, 2011 @05:52PM
(#2526799)
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.
The benchmark numbers on the linked page were from a small million entry database that easily fits in the OS buffer cache.