-
Notifications
You must be signed in to change notification settings - Fork 178
mv disable recovery log
- merged to master -
- code complete - February 28, 2017
- development started - February 28, 2017
THIS IS A DANGEROUS OPTION THAT CAN LEAD TO DATA LOSS! Use carefully.
Google's leveldb places data from every user's Write operation into both a sorted memory buffer and a disk based recovery log. leveldb later writes the sorted memory buffer to a level 0 .sst table file once the buffer is full. leveldb then erases the recovery file. Also, leveldb does not write the sorted memory buffer to disk upon user's Close request. Instead, it relies on the recovery log to repopulate the sorted memory buffer upon next data base open. The recovery log is essential to the durability of leveldb.
The recovery log is also reduces performance since the server must write data both to the recovery log and later to the .sst table file. There might be situations where the loss of data not written to the recovery log is acceptable. One such situation is with Riak TS's query buffers (Riak Time Series). The query buffer code creates a temporary leveldb database. The data written to the database is only valid until the user reads all the query results, or the server shutdowns (or dies). The query buffer's content is not expected, or even desired, to exist across database close / open sequences. Therefore disabling the recovery log is a performance gain without adding risk for the query buffer use case.