libfoedus-core
FOEDUS Core Library
Savepoint Manager

Savepoint Manager, which durably and atomically remembers what happened in the engine occasionally (eg. More...

Detailed Description

Savepoint Manager, which durably and atomically remembers what happened in the engine occasionally (eg.

every group commit).

Overview
In nutshell, this package durably and atomically (*) writes out a tiny file (savepoint file) whenever we advance the global epoch, replacing the savepoint file durably and atomically. The savepoint file is an XML file that describes the progress of individual loggers, log gleaners, and whatever we have to take note for durability and serializablity. These are very compact data, essentially only one or two integers per modules/threads. Thus, the dominating cost is fsync(), which is not cheap but we are okay to pay assuming epoch-based commit and reasonably fast media (SSD/NVRAM).
Why XML
As writing savepoint files happens only occasionally, file format doesn't matter for performance. Thus, we use XML for better debuggability and flexibility. We already use tinyxml for config files, so why not.
Terminology
We named this package savepoint rather than checkpoint. Checkpoint has a slightly different meaning in DBMS, so we avoid that. Savepoint also has a different meaning in DBMS, but it's very different, so no confusion.
See also
foedus::fs::durable_atomic_rename()
Collaboration diagram for Savepoint Manager:

Files

file  fwd.hpp
 Forward declarations of classes in savepoint manager package.
 

Classes

struct  foedus::savepoint::Savepoint
 The information we maintain in savepoint manager and externalize to a file. More...
 
struct  foedus::savepoint::FixedSavepoint
 Savepoint that can be stored in shared memory. More...
 
class  foedus::savepoint::SavepointManager
 Savepoint manager that atomically and durably writes out a savepoint file. More...
 
class  foedus::savepoint::SavepointManagerPimpl
 Pimpl object of SavepointManager. More...
 
struct  foedus::savepoint::SavepointOptions
 Set of options for savepoint manager. More...