This subsystem is used when recovery from application or system failure is necessary.
The log is stored in one or more files in the environment directory. Each file is named using the format log.NNNNNNNNNN, where NNNNNNNNNN is the sequence number of the file within the log.
If the log region is being created and log files are already present, the log files are reviewed and subsequent log writes are appended to the end of the log, rather than overwriting current log entries.
The lock subsystem is created, initialized, and opened by calls to
BDB::Env#open
with the BDB::INIT_LOG flag specified.
The following options can be given when the environnement is created
log_archive(flags = 0)
The log_archive function return an array of log or database file names.
flags value must be set to 0 or the value BDB::ARCH_DATA
((|BDB::ARCH_DATA|)), ((|BDB::ARCH_LOG|))
log_checkpoint(string)
log_curlsn(string)
log_each { |string, lsn| ... }
log_flush([string])
same as log_put(string, BDB::FLUSH)
Without argument, garantee that all records are written to the disk
log_get(flag)
The log_get return an array [String, BDB::Lsn] according to the flag value.
flag can has the value BDB::CHECKPOINT, BDB::FIRST, BDB::LAST, BDB::NEXT, BDB::PREV, BDB::CURRENT
log_put(string, flag = 0)
The log_put function appends records to the log. It return an object BDB::Lsn
flag can have the value BDB::CHECKPOINT, BDB::CURLSN, BDB::FLUSH
log_reverse_each { |string, lsn| ... }
log_stat
log_register(name)
log_unregister()
include Comparable
<=>
log_file(name)
file(name)
log_flush
flush
log_get
get