MiniOB 1
MiniOB is one mini database, helping developers to learn how database works.
载入中...
搜索中...
未找到
| 宏定义 | 枚举 | 函数
clog.h 文件参考
#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_CLOG_TYPE_ENUM

#define DEFINE_CLOG_TYPE_ENUM
值:
DEFINE_CLOG_TYPE(ERROR) \
DEFINE_CLOG_TYPE(MTR_BEGIN) \
DEFINE_CLOG_TYPE(MTR_COMMIT) \
DEFINE_CLOG_TYPE(MTR_ROLLBACK) \
DEFINE_CLOG_TYPE(INSERT) \
DEFINE_CLOG_TYPE(DELETE)