LineairDB  0.1.0
LineairDB::Config Struct Reference

Configuration and options for LineairDB instances. More...

#include <config.h>

Public Types

enum  ConcurrencyControl { Silo, SiloNWR, TwoPhaseLocking }
 
enum  Logger { ThreadLocalLogger }
 
enum  IndexStructure { HashTableWithPrecisionLockingIndex }
 
enum  CallbackEngine { ThreadLocal }
 

Public Attributes

size_t max_thread = std::thread::hardware_concurrency()
 The size of thread pool. More...
 
size_t epoch_duration_ms = 40
 The size of epoch duration (milliseconds). See [Tu13, Chandramouli18] to get more details of epoch-based group commit. Briefly, LineairDB concurrently processes transactions included in the same epoch duration. As you set the larger duration to this paramter, you may get a higher throughput. However, this setting results in the increase of average response time. More...
 
ConcurrencyControl concurrency_control_protocol = SiloNWR
 Set a concurrency control algorithm. See LineairDB::Config::ConcurrencyControl for the enum options of this configuration. More...
 
Logger logger = ThreadLocalLogger
 Set a logging algorithm. See LineairDB::Config::Logger for the enum options of this configuration. More...
 
IndexStructure index_structure = HashTableWithPrecisionLockingIndex
 Set the type of index. See LineairDB::Config::IndexStructure for the enum options of this configuration. More...
 
CallbackEngine callback_engine = ThreadLocal
 Set the type of callback engine. See LineairDB::Config::CallBackEngine for the enum options of this configuration. More...
 
bool enable_recovery = true
 If true, LineairDB processes recovery at the instantiation. More...
 
bool enable_logging = true
 If true, LineairDB performs logging for recovery. More...
 
bool enable_checkpointing = true
 If true, LineairDB performs logging for checkpoint-recovery. Checkpointing prevents the log file size from increasing monotonically. i.e, if this parameter is set to false, The disk space used by LineairDB is unbounded. You can also turn off enable_logging and use only Checkpointing. This configure gives the recoverability property called CPR-consistency [1]. CPR-consitency may volatilize the data of committed transactions at last the number of seconds specified at checkpoint_period; however, the persistence of the data before that time is guaranteed. More...
 
size_t checkpoint_period = 30
 It uses as the interval time (seconds) for checkpointing. The longer is the better for the performance but the larger interval time causes the increasing of log file size. More...
 
std::string work_dir = "./lineairdb_logs"
 The directory path that lineardb use as working directory. All of data, logs and related files are stored in the directory. More...
 

Detailed Description

Configuration and options for LineairDB instances.

Member Enumeration Documentation

◆ CallbackEngine

Enumerator
ThreadLocal 

◆ ConcurrencyControl

Enumerator
Silo 
SiloNWR 
TwoPhaseLocking 

◆ IndexStructure

Enumerator
HashTableWithPrecisionLockingIndex 

◆ Logger

Enumerator
ThreadLocalLogger 

Member Data Documentation

◆ callback_engine

CallbackEngine LineairDB::Config::callback_engine = ThreadLocal

Set the type of callback engine. See LineairDB::Config::CallBackEngine for the enum options of this configuration.

Default: ThreadLocal

◆ checkpoint_period

size_t LineairDB::Config::checkpoint_period = 30

It uses as the interval time (seconds) for checkpointing. The longer is the better for the performance but the larger interval time causes the increasing of log file size.

Default: 30

◆ concurrency_control_protocol

ConcurrencyControl LineairDB::Config::concurrency_control_protocol = SiloNWR

Set a concurrency control algorithm. See LineairDB::Config::ConcurrencyControl for the enum options of this configuration.

Default: SiloNWR

◆ enable_checkpointing

bool LineairDB::Config::enable_checkpointing = true

If true, LineairDB performs logging for checkpoint-recovery. Checkpointing prevents the log file size from increasing monotonically. i.e, if this parameter is set to false, The disk space used by LineairDB is unbounded. You can also turn off enable_logging and use only Checkpointing. This configure gives the recoverability property called CPR-consistency [1]. CPR-consitency may volatilize the data of committed transactions at last the number of seconds specified at checkpoint_period; however, the persistence of the data before that time is guaranteed.

Default: true [1]: https://www.microsoft.com/en-us/research/uploads/prod/2019/01/cpr-sigmod19.pdf

◆ enable_logging

bool LineairDB::Config::enable_logging = true

If true, LineairDB performs logging for recovery.

Default: true

◆ enable_recovery

bool LineairDB::Config::enable_recovery = true

If true, LineairDB processes recovery at the instantiation.

Default: true

◆ epoch_duration_ms

size_t LineairDB::Config::epoch_duration_ms = 40

The size of epoch duration (milliseconds). See [Tu13, Chandramouli18] to get more details of epoch-based group commit. Briefly, LineairDB concurrently processes transactions included in the same epoch duration. As you set the larger duration to this paramter, you may get a higher throughput. However, this setting results in the increase of average response time.

Default: 40ms.

See also
[Tu13] https://dl.acm.org/doi/10.1145/2517349.2522713
[Chandramouli18] https://www.microsoft.com/en-us/research/uploads/prod/2018/03/faster-sigmod18.pdf

◆ index_structure

IndexStructure LineairDB::Config::index_structure = HashTableWithPrecisionLockingIndex

Set the type of index. See LineairDB::Config::IndexStructure for the enum options of this configuration.

Default: Hash table with precision locking index

◆ logger

Logger LineairDB::Config::logger = ThreadLocalLogger

Set a logging algorithm. See LineairDB::Config::Logger for the enum options of this configuration.

Default: ThreadLocalLogger

◆ max_thread

size_t LineairDB::Config::max_thread = std::thread::hardware_concurrency()

The size of thread pool.

Default: LineairDB allocates threads as many the return value of std::thread::hardware_concurrency().

◆ work_dir

std::string LineairDB::Config::work_dir = "./lineairdb_logs"

The directory path that lineardb use as working directory. All of data, logs and related files are stored in the directory.

Default: "lineairdb_logs"


The documentation for this struct was generated from the following file: