MiniOB 1
MiniOB is one mini database, helping developers to learn how database works.
|
#include <stddef.h>
#include <stdint.h>
#include <list>
#include <atomic>
#include <unordered_map>
#include <deque>
#include <memory>
#include <string>
#include "storage/record/record.h"
#include "storage/persist/persist.h"
#include "common/lang/mutex.h"
类 | |
struct | CLogRecordHeader |
CLog的记录头。每个日志都带有这个信息 更多... | |
struct | CLogRecordCommitData |
MTR_COMMIT 日志的数据 更多... | |
struct | CLogRecordData |
有具体数据修改的事务日志数据 更多... | |
class | CLogRecord |
表示一条日志记录 更多... | |
class | CLogBuffer |
缓存运行时产生的日志对象 更多... | |
class | CLogFile |
读写日志文件 更多... | |
class | CLogRecordIterator |
日志记录遍历器 更多... | |
class | CLogManager |
日志管理器 更多... | |
宏定义 | |
#define | DEFINE_CLOG_TYPE_ENUM |
#define | DEFINE_CLOG_TYPE(name) name, |
枚举 | |
enum class | CLogType { DEFINE_CLOG_TYPE , DEFINE_CLOG_TYPE_ENUM } |
定义clog的几种类型 更多... | |
函数 | |
const char * | clog_type_name (CLogType type) |
clog type 转换成字符串 | |
int32_t | clog_type_to_integer (CLogType type) |
clog type 转换成数字 | |
CLogType | clog_type_from_integer (int32_t value) |
数字转换成clog type | |
这个模块想要实现数据库事务中的D(durability),也就是持久化。 持久化是事务四大特性(ACID)中最复杂的模块,这里的实现简化了99.999,仅在一些特定场景下才能 恢复数据库。
#define DEFINE_CLOG_TYPE_ENUM |