stldb::Logger
// In header: </Users/bobw/workspace/stldb_lib/stldb/logger.h> template<typename void_alloc_t, typename mutex_type> class Logger { public: // construct/copy/destruct Logger(); ~Logger(); // public member functions void set_shared_info(SharedLogInfo< void_alloc_t, mutex_type > *) ; void record_diskless_commit() ; log_stats get_stats(bool = false) ; transaction_id_t queue_for_commit(stldb::commit_buffer_t< void_alloc_t > *) ; void log(transaction_id_t) ; // private member functions void ensure_open_logfile() ; };
The logger is invoked when transactions are committing.
Logger
public member functionsvoid set_shared_info(SharedLogInfo< void_alloc_t, mutex_type > * log_info) ;
Set the shared log info.
void record_diskless_commit() ;
log_stats get_stats(bool reset = false) ;
transaction_id_t queue_for_commit(stldb::commit_buffer_t< void_alloc_t > * buff) ;
If there is no txn currently waiting for a shot at the log, then immediately grant the process access to the log. Otherwise, it joins the waiting list.
void log(transaction_id_t my_commit_seq) ;
Acquire the right to write to the log file, and then write data from the commit queue as necessary until out buffer has been written. Once the data has been written, optionally call sync() to wait for that data to make it out of OS memory and to the disk.