
On Wed, Mar 29, 2017 at 9:49 AM, Peter Dimov via Boost
But you do guarantee that if this insert is present in the recovered database, all earlier inserts are too, right? This is what you need for the letter C.
Yes. NuDB buffers insertions into memory (that's what the "cache" and "pool" classes are for). Once per second, or sooner depending on the insertion load, the implementation runs a "commit". The commit process acquires all the insertions buffered up to that point, renders the changed buckets in memory, creates a backup of the buckets in their before-modified state to the log file, applies the changes, and then resets the log file. The commit process is atomic, either it all goes through or it fails and the database is recovered to the state before the commit.