libfoedus-core
FOEDUS Core Library

Log Manager, which writes out transactional logs. More...

Detailed Description

Log Manager, which writes out transactional logs.

This package contains classes that control transactional logging.

Decentralized Logging
Unlike traditional log manager in DBMS, this log manager is decentralized, meaning each log writer writes to its own file concurrently. This eliminates the bottleneck in log manager when there are a large number of cores. The basic idea to guarantee serializability is the epoch-based commit protocol, which does the check on all loggers before returning the results to client in a way similar to group-commit.
Thread-private log buffer
Each ThreadLoadBugger instance maintains a thread-local log buffer that is filled by the thread without any synchronization or blocking. The logger collects them and writes them out to log files. A single log writer handles one or more transactional threads (cores), and a single NUMA node hosts one or more log writers.
See also
foedus::log::ThreadLogBuffer
Log Writer
Each Logger instance writes out files suffixed with ordinal (eg ".0", ".1"...). The older logs files are deactivated and deleted after log gleaner consumes them.
See also
foedus::log::Logger
Global Durable Epoch
An important job of Log Manager is to maintain the global durable epoch. Log manager is the module to determine when it's safe to advance the global durable epoch. It makes sure all loggers flushed their logs up to the epoch, invoked required fsync(), and also takes a savepoint before it announces the new global durable epoch.
See also
foedus::log::LogManager
Collaboration diagram for Log Manager:

Modules

 Log Types
 Defines the content and apply logic of transactional operatrions.
 

Files

file  common_log_types.hpp
 Declares common log types used in all packages.
 
file  fwd.hpp
 Forward declarations of classes in log manager package.
 
file  log_id.hpp
 Typedefs of ID types used in log package.
 

Classes

struct  foedus::log::FillerLogType
 A dummy log type to fill up a sector in log files. More...
 
struct  foedus::log::EpochMarkerLogType
 A log type to declare a switch of epoch in a logger or the engine. More...
 
struct  foedus::log::EpochHistory
 Represents an event where a logger switched its epoch. More...
 
struct  foedus::log::LogRange
 a contiguous range of log entries that might span multiple files. More...
 
class  foedus::log::LogManager
 Log Manager class that provides API to write/read transaction logs. More...
 
class  foedus::log::LogManagerPimpl
 Pimpl object of LogManager. More...
 
struct  foedus::log::LogOptions
 Set of options for log manager. More...
 
class  foedus::log::Logger
 A log writer that writes out buffered logs to stable storages. More...
 
class  foedus::log::LoggerRef
 A view of Logger object for other SOCs and master engine. More...
 
class  foedus::log::MetaLogBuffer
 A single log buffer for metadata (eg create/drop storage). More...
 
class  foedus::log::MetaLogger
 A log writer for metadata operation. More...
 
struct  foedus::log::ThreadEpockMark
 A thread-buffer's epoch marker, which indicates where a thread switched an epoch. More...
 
struct  foedus::log::ThreadLogBufferMeta
 Metadata part of ThreadLogBuffer, without the actual buffer which is way way larger. More...
 
struct  foedus::log::ThreadLogBuffer::OffsetRange
 
class  foedus::log::ThreadLogBuffer
 A thread-local log buffer. More...
 

Typedefs

typedef uint16_t foedus::log::LoggerId
 Typedef for an ID of Logger. More...
 
typedef uint32_t foedus::log::LogFileOrdinal
 Ordinal of log files (eg "log.0", "log.1"). More...
 

Typedef Documentation

Ordinal of log files (eg "log.0", "log.1").

Each logger outputs log files whose filename is suffixed with an ordinal. Each log file

Definition at line 46 of file log_id.hpp.

Typedef for an ID of Logger.

ID of Logger is merely an ordinal without holes. In other words, "(loggers_per_node * NUMA_node_id) + ordinal_in_node".

Definition at line 36 of file log_id.hpp.