Skip to content

Commit 291eb33

Browse files
authoredJun 27, 2023
### What problem were solved in this pull request? Issue Number: close oceanbase#191 Problem: doxy文档的首页没有描述 ### What is changed and how it works? 增加首页描述信息,写在了main.cpp中 ### Other information
1 parent f4e5213 commit 291eb33

18 files changed

+189
-72
lines changed
 

‎src/observer/main.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -189,3 +189,11 @@ int main(int argc, char **argv)
189189

190190
delete g_server;
191191
}
192+
193+
/**
194+
* @mainpage MiniOB
195+
*
196+
* MiniOB 是 OceanBase 与华中科技大学联合开发的、面向"零"基础同学的数据库入门学习项目。
197+
*
198+
* MiniOB 设计的目标是面向在校学生、数据库从业者、爱好者,或者对基础技术有兴趣的爱好者, 整体代码量少,易于上手并学习, 是一个系统性的数据库学习项目。miniob 设置了一系列由浅入深的题目,以帮助同学们"零"基础入门, 让同学们快速了解数据库并深入学习数据库内核,期望通过相关训练之后,能够熟练掌握数据库内核模块的功能与协同关系, 并能够在使用数据库时,设计出高效的 SQL 。miniob 为了更好的学习数据库实现原理, 对诸多模块都做了简化,比如不考虑并发操作, 安全特性, 复杂的事物管理等功能。
199+
*/

‎src/observer/sql/executor/command_executor.h

+8
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,15 @@ See the Mulan PSL v2 for more details. */
1818

1919
class SQLStageEvent;
2020

21+
/**
22+
* @defgroup Executor
23+
* @brief 一些SQL语句不会生成对应的执行计划,直接使用Executor来执行,比如DDL语句
24+
*/
2125

26+
/**
27+
* @brief 执行器
28+
* @ingroup Executor
29+
*/
2230
class CommandExecutor
2331
{
2432
public:

‎src/observer/sql/executor/create_index_executor.h

+5
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ See the Mulan PSL v2 for more details. */
1818

1919
class SQLStageEvent;
2020

21+
/**
22+
* @brief 创建索引的执行器
23+
* @ingroup Executor
24+
* @note 创建索引时不能做其它操作。MiniOB当前不完善,没有对一些并发做控制,包括schema的并发。
25+
*/
2126
class CreateIndexExecutor
2227
{
2328
public:

‎src/observer/sql/executor/create_table_executor.h

+4
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ See the Mulan PSL v2 for more details. */
1818

1919
class SQLStageEvent;
2020

21+
/**
22+
* @brief 创建表的执行器
23+
* @ingroup Executor
24+
*/
2125
class CreateTableExecutor
2226
{
2327
public:

‎src/observer/sql/executor/desc_table_executor.h

+4
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ See the Mulan PSL v2 for more details. */
1818

1919
class SQLStageEvent;
2020

21+
/**
22+
* @brief 描述表的执行器
23+
* @ingroup Executor
24+
*/
2125
class DescTableExecutor
2226
{
2327
public:

‎src/observer/sql/executor/help_executor.h

+4
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ See the Mulan PSL v2 for more details. */
2121
#include "sql/executor/sql_result.h"
2222
#include "session/session.h"
2323

24+
/**
25+
* @brief Help语句执行器
26+
* @ingroup Executor
27+
*/
2428
class HelpExecutor
2529
{
2630
public:

‎src/observer/sql/executor/show_tables_executor.h

+5
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ See the Mulan PSL v2 for more details. */
2222
#include "session/session.h"
2323
#include "storage/db/db.h"
2424

25+
/**
26+
* @brief 显示所有表的执行器
27+
* @ingroup Executor
28+
* @note 与CreateIndex类似,不处理并发
29+
*/
2530
class ShowTablesExecutor
2631
{
2732
public:

‎src/observer/sql/executor/sql_result.h

+9-3
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ See the Mulan PSL v2 for more details. */
2222

2323
class Session;
2424

25+
/**
26+
* @brief SQL执行结果
27+
* @details 如果当前SQL生成了执行计划,那么在返回客户端时,调用执行计划返回结果。
28+
* 否则返回的结果就是当前SQL的执行结果,比如DDL语句,通过return_code和state_string来描述。
29+
* 如果出现了一些错误,也可以通过return_code和state_string来获取信息。
30+
*/
2531
class SqlResult
2632
{
2733
public:
@@ -63,9 +69,9 @@ class SqlResult
6369
RC next_tuple(Tuple *&tuple);
6470

6571
private:
66-
Session *session_ = nullptr;
67-
std::unique_ptr<PhysicalOperator> operator_;
68-
TupleSchema tuple_schema_;
72+
Session *session_ = nullptr; ///< 当前所属会话
73+
std::unique_ptr<PhysicalOperator> operator_; ///< 执行计划
74+
TupleSchema tuple_schema_; ///< 返回的表头信息。可能有也可能没有
6975
RC return_code_ = RC::SUCCESS;
7076
std::string state_string_;
7177
};

‎src/observer/sql/executor/trx_begin_executor.h

+4
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ See the Mulan PSL v2 for more details. */
2222
#include "session/session.h"
2323
#include "storage/trx/trx.h"
2424

25+
/**
26+
* @brief 事务开始语句的执行器
27+
* @ingroup Executor
28+
*/
2529
class TrxBeginExecutor
2630
{
2731
public:

‎src/observer/sql/executor/trx_end_executor.h

+4
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ See the Mulan PSL v2 for more details. */
2222
#include "storage/trx/trx.h"
2323
#include "sql/stmt/stmt.h"
2424

25+
/**
26+
* @brief 事务结束的执行器,可以是提交或回滚
27+
* @ingroup Executor
28+
*/
2529
class TrxEndExecutor
2630
{
2731
public:

‎src/observer/sql/expr/expression.h

+39-10
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,29 @@ See the Mulan PSL v2 for more details. */
2222

2323
class Tuple;
2424

25+
/**
26+
* @defgroup Expression
27+
* @brief 表达式
28+
*/
29+
30+
/**
31+
* @brief 表达式类型
32+
* @ingroup Expression
33+
*/
2534
enum class ExprType
2635
{
2736
NONE,
28-
FIELD,
29-
VALUE,
30-
CAST,
31-
COMPARISON,
32-
CONJUNCTION,
37+
FIELD, ///< 字段。在实际执行时,根据行数据内容提取对应字段的值
38+
VALUE, ///< 常量值
39+
CAST, ///< 需要做类型转换的表达式
40+
COMPARISON, ///< 需要做比较的表达式
41+
CONJUNCTION, ///< 多个表达式使用同一种关系(AND或OR)来联结
3342
};
3443

3544
/**
36-
* 表达式的抽象描述
37-
* 在SQL的元素中,任何需要得出值的元素都可以使用表达式来描述
45+
* @brief 表达式的抽象描述
46+
* @ingroup Expression
47+
* @details 在SQL的元素中,任何需要得出值的元素都可以使用表达式来描述
3848
* 比如获取某个字段的值、比较运算、类型转换
3949
* 当然还有一些当前没有实现的表达式,比如算术运算。
4050
*
@@ -49,22 +59,27 @@ class Expression
4959
virtual ~Expression() = default;
5060

5161
/**
52-
* 根据具体的tuple,来计算当前表达式的值
62+
* @brief 根据具体的tuple,来计算当前表达式的值。tuple有可能是一个具体某个表的行数据
5363
*/
5464
virtual RC get_value(const Tuple &tuple, TupleCell &cell) const = 0;
5565

5666
/**
57-
* 表达式的类型
67+
* @brief 表达式的类型
5868
* 可以根据表达式类型来转换为具体的子类
5969
*/
6070
virtual ExprType type() const = 0;
6171

6272
/**
63-
* 表达式值的类型
73+
* @brief 表达式值的类型
74+
* @details 一个表达式运算出结果后,只有一个值
6475
*/
6576
virtual AttrType value_type() const = 0;
6677
};
6778

79+
/**
80+
* @brief 字段表达式
81+
* @ingroup Expression
82+
*/
6883
class FieldExpr : public Expression
6984
{
7085
public:
@@ -111,6 +126,10 @@ class FieldExpr : public Expression
111126
Field field_;
112127
};
113128

129+
/**
130+
* @brief 常量值表达式
131+
* @ingroup Expression
132+
*/
114133
class ValueExpr : public Expression
115134
{
116135
public:
@@ -166,6 +185,10 @@ class ValueExpr : public Expression
166185
TupleCell tuple_cell_;
167186
};
168187

188+
/**
189+
* @brief 类型转换表达式
190+
* @ingroup Expression
191+
*/
169192
class CastExpr : public Expression
170193
{
171194
public:
@@ -192,6 +215,10 @@ class CastExpr : public Expression
192215
AttrType cast_type_;
193216
};
194217

218+
/**
219+
* @brief 比较表达式
220+
* @ingroup Expression
221+
*/
195222
class ComparisonExpr : public Expression
196223
{
197224
public:
@@ -240,6 +267,8 @@ class ComparisonExpr : public Expression
240267
};
241268

242269
/**
270+
* @brief 联结表达式
271+
* @ingroup Expression
243272
* 多个表达式使用同一种关系(AND或OR)来联结
244273
* 当前miniob仅有AND操作
245274
*/

‎src/observer/sql/expr/tuple_cell.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ See the Mulan PSL v2 for more details. */
1818
#include "storage/table/table.h"
1919
#include "storage/field/field_meta.h"
2020

21-
class TupleCellSpec {
21+
class TupleCellSpec
22+
{
2223
public:
2324
TupleCellSpec(const char *table_name, const char *field_name, const char *alias = nullptr);
2425
TupleCellSpec(const char *alias);

‎src/observer/sql/parser/parse_defs.h

+24-24
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ enum CompOp
5252
enum AttrType
5353
{
5454
UNDEFINED,
55-
CHARS, /// 字符串类型
56-
INTS, /// 整数类型(4字节)
57-
FLOATS, /// 浮点数类型(4字节)
58-
BOOLEANS, /// boolean类型,当前不是由parser解析出来的,是程序内部使用的
55+
CHARS, ///< 字符串类型
56+
INTS, ///< 整数类型(4字节)
57+
FLOATS, ///< 浮点数类型(4字节)
58+
BOOLEANS, ///< boolean类型,当前不是由parser解析出来的,是程序内部使用的
5959
};
6060

6161
/**
@@ -64,14 +64,14 @@ enum AttrType
6464
*/
6565
struct Value
6666
{
67-
AttrType type; /// 属性的类型
68-
int int_value; /// 如果是整数,这个值就有意义
69-
float float_value; /// 如果是浮点数,这个值就有意义
70-
bool bool_value; /// 如果是boolean值,这个值就有意义
71-
std::string string_value; /// 如果是字符串,这个值就有意义
67+
AttrType type; ///< 属性的类型
68+
int int_value; ///< 如果是整数,这个值就有意义
69+
float float_value; ///< 如果是浮点数,这个值就有意义
70+
bool bool_value; ///< 如果是boolean值,这个值就有意义
71+
std::string string_value; ///< 如果是字符串,这个值就有意义
7272

73-
const char *data() const; /// 获取值的内存地址
74-
int length(); /// 获取占用的内存长度
73+
const char *data() const; ///< 获取值的内存地址
74+
int length(); ///< 获取占用的内存长度
7575
};
7676

7777
/**
@@ -105,9 +105,9 @@ struct Condition
105105
*/
106106
struct Selects
107107
{
108-
std::vector<RelAttr> attributes; /// attributes in select clause
109-
std::vector<std::string> relations; /// 查询的表
110-
std::vector<Condition> conditions; /// 查询条件,使用AND串联起来多个条件
108+
std::vector<RelAttr> attributes; ///< attributes in select clause
109+
std::vector<std::string> relations; ///< 查询的表
110+
std::vector<Condition> conditions; ///< 查询条件,使用AND串联起来多个条件
111111
};
112112

113113
/**
@@ -116,8 +116,8 @@ struct Selects
116116
*/
117117
struct Inserts
118118
{
119-
std::string relation_name; /// Relation to insert into
120-
std::vector<Value> values; /// 要插入的值
119+
std::string relation_name; ///< Relation to insert into
120+
std::vector<Value> values; ///< 要插入的值
121121
};
122122

123123
/**
@@ -135,9 +135,9 @@ struct Deletes
135135
*/
136136
struct Updates
137137
{
138-
std::string relation_name; // Relation to update
139-
std::string attribute_name; /// 更新的字段,仅支持一个字段
140-
Value value; /// 更新的值,仅支持一个字段
138+
std::string relation_name; ///< Relation to update
139+
std::string attribute_name; ///< 更新的字段,仅支持一个字段
140+
Value value; ///< 更新的值,仅支持一个字段
141141
std::vector<Condition> conditions;
142142
};
143143

@@ -149,9 +149,9 @@ struct Updates
149149
*/
150150
struct AttrInfo
151151
{
152-
AttrType type; /// Type of attribute
153-
std::string name; /// Attribute name
154-
size_t length; /// Length of attribute
152+
AttrType type; ///< Type of attribute
153+
std::string name; ///< Attribute name
154+
size_t length; ///< Length of attribute
155155
};
156156

157157
/**
@@ -191,8 +191,8 @@ struct CreateIndex
191191
*/
192192
struct DropIndex
193193
{
194-
std::string index_name; // Index name
195-
std::string relation_name; // Relation name
194+
std::string index_name; ///< Index name
195+
std::string relation_name; ///< Relation name
196196
};
197197

198198
/**

‎src/observer/storage/buffer/disk_buffer_pool.h

+27
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,13 @@ class DiskBufferPool;
4747
/**
4848
* @brief BufferPool的文件第一个页面,存放一些元数据信息,包括了后面每页的分配信息。
4949
* @ingroup BufferPool
50+
* @details
51+
* @code
5052
* TODO 1. 当前的做法,只能分配比较少的页面,你可以扩展一下,支持更多的页面或无限多的页面吗?
5153
* 可以参考Linux ext(n)和Windows NTFS等文件系统
5254
* 2. 当前使用bitmap存放页面分配情况,但是这种方法在页面非常多的时候,查找空闲页面的
5355
* 效率非常低,你有办法优化吗?
56+
* @endcode
5457
*/
5558
struct BPFileHeader
5659
{
@@ -69,6 +72,10 @@ struct BPFileHeader
6972
/**
7073
* @brief 管理页面Frame
7174
* @ingroup BufferPool
75+
* @details 管理内存中的页帧。内存是有限的,内存中能够存放的页帧个数也是有限的。
76+
* 当内存中的页帧不够用时,需要从内存中淘汰一些页帧,以便为新的页帧腾出空间。
77+
* 这个管理器负责为所有的BufferPool提供页帧管理服务,也就是所有的BufferPool磁盘文件
78+
* 在访问时都使用这个管理器映射到内存。
7279
*/
7380
class BPFrameManager
7481
{
@@ -78,10 +85,30 @@ class BPFrameManager
7885
RC init(int pool_num);
7986
RC cleanup();
8087

88+
/**
89+
* @brief 获取指定的页面
90+
*
91+
* @param file_desc 文件描述符,也可以当做buffer pool文件的标识
92+
* @param page_num 页面号
93+
* @return Frame* 页帧指针
94+
*/
8195
Frame *get(int file_desc, PageNum page_num);
8296

97+
/**
98+
* @brief 列出所有指定文件的页面
99+
*
100+
* @param file_desc 文件描述符
101+
* @return std::list<Frame *> 页帧列表
102+
*/
83103
std::list<Frame *> find_list(int file_desc);
84104

105+
/**
106+
* @brief 分配一个新的页面
107+
*
108+
* @param file_desc 文件描述符
109+
* @param page_num 页面编号
110+
* @return Frame* 页帧指针
111+
*/
85112
Frame *alloc(int file_desc, PageNum page_num);
86113

87114
/**

‎src/observer/storage/buffer/frame.h

+13-5
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,14 @@ class FrameId
4949
/**
5050
* @brief 页帧
5151
* @ingroup BufferPool
52+
* @details 页帧是磁盘文件在内存中的表示。磁盘文件按照页面来操作,操作之前先映射到内存中,
53+
* 将磁盘数据读取到内存中,也就是页帧。
54+
*
55+
* 当某个页面被淘汰时,如果有些内容曾经变更过,那么就需要将这些内容刷新到磁盘上。这里有
56+
* 一个dirty标识,用来标识页面是否被修改过。
57+
*
58+
* 为了防止在使用过程中页面被淘汰,这里使用了pin count,当页面被使用时,pin count会增加,
59+
* 当页面不再使用时,pin count会减少。当pin count为0时,页面可以被淘汰。
5260
*/
5361
class Frame
5462
{
@@ -59,8 +67,8 @@ class Frame
5967
}
6068

6169
/**
62-
* reinit 和 reset 在 MemPoolSimple 中使用
63-
* 在 MemPoolSimple 分配和释放一个Frame对象时,不会调用构造函数和析构函数,
70+
* @brief reinit 和 reset 在 MemPoolSimple 中使用
71+
* @details 在 MemPoolSimple 分配和释放一个Frame对象时,不会调用构造函数和析构函数,
6472
* 而是调用reinit和reset。
6573
*/
6674
void reinit()
@@ -86,7 +94,7 @@ class Frame
8694
void access();
8795

8896
/**
89-
* 标记指定页面为“脏”页。如果修改了页面的内容,则应调用此函数,
97+
* @brief 标记指定页面为“脏”页。如果修改了页面的内容,则应调用此函数,
9098
* 以便该页面被淘汰出缓冲区时系统将新的页面数据写入磁盘文件
9199
*/
92100
void mark_dirty() { dirty_ = true; }
@@ -98,13 +106,13 @@ class Frame
98106
bool can_purge() { return pin_count_.load() == 0; }
99107

100108
/**
101-
* 给当前页帧增加引用计数
109+
* @brief 给当前页帧增加引用计数
102110
* pin通常都会加着frame manager锁来访问
103111
*/
104112
void pin();
105113

106114
/**
107-
* 释放一个当前页帧的引用计数
115+
* @brief 释放一个当前页帧的引用计数
108116
* 与pin对应,但是通常不会加着frame manager的锁来访问
109117
*/
110118
int unpin();

‎src/observer/storage/buffer/page.h

-4
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,9 @@ See the Mulan PSL v2 for more details. */
2020
using TrxID = int32_t;
2121

2222
static constexpr int BP_INVALID_PAGE_NUM = -1;
23-
static constexpr int INVALID_TRX_ID = -1;
24-
static constexpr int INVALID_LSN = -1;
2523

2624
static constexpr PageNum BP_HEADER_PAGE = 0;
2725

28-
static constexpr int LOG_BUFFER_SIZE = 1<<10; // TODO move to log record
29-
3026
static constexpr const int BP_PAGE_SIZE = (1 << 13);
3127
static constexpr const int BP_PAGE_DATA_SIZE = (BP_PAGE_SIZE - sizeof(PageNum) - sizeof(LSN));
3228

‎src/observer/storage/index/bplus_tree.h

+27-23
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ See the Mulan PSL v2 for more details. */
3131

3232
/**
3333
* @brief B+树的实现
34-
* @defgroup B+Tree
34+
* @defgroup BPlusTree
3535
*/
3636

3737
#define EMPTY_RID_PAGE_NUM -1 // TODO remove me
3838
#define EMPTY_RID_SLOT_NUM -1
3939

4040
/**
4141
* @brief B+树的操作类型
42-
* @ingroup B+Tree
42+
* @ingroup BPlusTree
4343
*/
4444
enum class BplusTreeOperationType
4545
{
@@ -50,7 +50,7 @@ enum class BplusTreeOperationType
5050

5151
/**
5252
* @brief 属性比较
53-
* @ingroup B+Tree
53+
* @ingroup BPlusTree
5454
*/
5555
class AttrComparator
5656
{
@@ -92,7 +92,7 @@ class AttrComparator
9292

9393
/**
9494
* @brief 键值比较
95-
* @ingroup B+Tree
95+
* @ingroup BPlusTree
9696
*/
9797
class KeyComparator
9898
{
@@ -125,7 +125,7 @@ class KeyComparator
125125

126126
/**
127127
* @brief 属性打印,调试使用
128-
* @ingroup B+Tree
128+
* @ingroup BPlusTree
129129
*/
130130
class AttrPrinter
131131
{
@@ -174,7 +174,7 @@ class AttrPrinter
174174

175175
/**
176176
* @brief 键值打印,调试使用
177-
* @ingroup B+Tree
177+
* @ingroup BPlusTree
178178
*/
179179
class KeyPrinter
180180
{
@@ -205,7 +205,7 @@ class KeyPrinter
205205

206206
/**
207207
* @brief the meta information of bplus tree
208-
* @ingroup B+Tree
208+
* @ingroup BPlusTree
209209
* @details this is the first page of bplus tree.
210210
* only one field can be supported, can you extend it to multi-fields?
211211
*/
@@ -216,12 +216,12 @@ struct IndexFileHeader
216216
memset(this, 0, sizeof(IndexFileHeader));
217217
root_page = BP_INVALID_PAGE_NUM;
218218
}
219-
PageNum root_page;
220-
int32_t internal_max_size;
221-
int32_t leaf_max_size;
222-
int32_t attr_length;
223-
int32_t key_length; // attr length + sizeof(RID)
224-
AttrType attr_type;
219+
PageNum root_page; ///< 根节点在磁盘中的页号
220+
int32_t internal_max_size; ///< 内部节点最大的键值对数
221+
int32_t leaf_max_size; ///< 叶子节点最大的键值对数
222+
int32_t attr_length; ///< 键值的长度
223+
int32_t key_length; ///< attr length + sizeof(RID)
224+
AttrType attr_type; ///< 键值的类型
225225

226226
const std::string to_string()
227227
{
@@ -240,9 +240,11 @@ struct IndexFileHeader
240240

241241
/**
242242
* @brief the common part of page describtion of bplus tree
243-
* @ingroup B+Tree
243+
* @ingroup BPlusTree
244+
* @code
244245
* storage format:
245246
* | page type | item number | parent page id |
247+
* @endcode
246248
*/
247249
struct IndexNode
248250
{
@@ -255,11 +257,12 @@ struct IndexNode
255257

256258
/**
257259
* @brief leaf page of bplus tree
258-
* @ingroup B+Tree
260+
* @ingroup BPlusTree
261+
* @code
259262
* storage format:
260263
* | common header | prev page id | next page id |
261264
* | key0, rid0 | key1, rid1 | ... | keyn, ridn |
262-
*
265+
* @endcode
263266
* the key is in format: the key value of record and rid.
264267
* so the key in leaf page must be unique.
265268
* the value is rid.
@@ -278,11 +281,12 @@ struct LeafIndexNode : public IndexNode
278281

279282
/**
280283
* @brief internal page of bplus tree
281-
* @ingroup B+Tree
284+
* @ingroup BPlusTree
285+
* @code
282286
* storage format:
283287
* | common header |
284288
* | key(0),page_id(0) | key(1), page_id(1) | ... | key(n), page_id(n) |
285-
*
289+
* @endcode
286290
* the first key is ignored(key0).
287291
* so it will waste space, can you fix this?
288292
*/
@@ -298,7 +302,7 @@ struct InternalIndexNode : public IndexNode
298302

299303
/**
300304
* @brief IndexNode 仅作为数据在内存或磁盘中的表示
301-
* @ingroup B+Tree
305+
* @ingroup BPlusTree
302306
* IndexNodeHandler 负责对IndexNode做各种操作。
303307
* 作为一个类来说,虚函数会影响“结构体”真实的内存布局,所以将数据存储与操作分开
304308
*/
@@ -337,7 +341,7 @@ class IndexNodeHandler
337341

338342
/**
339343
* @brief 叶子节点的操作
340-
* @ingroup B+Tree
344+
* @ingroup BPlusTree
341345
*/
342346
class LeafIndexNodeHandler : public IndexNodeHandler
343347
{
@@ -388,7 +392,7 @@ class LeafIndexNodeHandler : public IndexNodeHandler
388392

389393
/**
390394
* @brief 内部节点的操作
391-
* @ingroup B+Tree
395+
* @ingroup BPlusTree
392396
*/
393397
class InternalIndexNodeHandler : public IndexNodeHandler
394398
{
@@ -453,7 +457,7 @@ class InternalIndexNodeHandler : public IndexNodeHandler
453457

454458
/**
455459
* @brief B+树的实现
456-
* @ingroup B+Tree
460+
* @ingroup BPlusTree
457461
*/
458462
class BplusTreeHandler
459463
{
@@ -587,7 +591,7 @@ class BplusTreeHandler
587591

588592
/**
589593
* @brief B+树的扫描器
590-
* @ingroup B+Tree
594+
* @ingroup BPlusTree
591595
*/
592596
class BplusTreeScanner
593597
{

‎src/observer/storage/record/record_manager.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ class Table;
2929
* @brief 这里负责管理在一个文件上表记录(行)的组织/管理
3030
* @defgroup RecordManager
3131
*
32-
* @file record_manager.h
33-
*
3432
* @details 表记录管理的内容包括如何在文件上存放、读取、检索。也就是记录的增删改查。
3533
* 这里的文件都会被拆分成页面,每个页面都有一样的大小。更详细的信息可以参考BufferPool。
3634
* 按照BufferPool的设计,第一个页面用来存放BufferPool本身的元数据,比如当前文件有多少页面、已经分配了多少页面、
@@ -104,9 +102,11 @@ class RecordPageIterator
104102
* @brief 负责处理一个页面中各种操作,比如插入记录、删除记录或者查找记录
105103
* @ingroup RecordManager
106104
* @details 当前定长记录模式下每个页面的组织大概是这样的:
105+
* @code
107106
* | PageHeader | record allocate bitmap |
108107
* |------------|------------------------|
109108
* | record1 | record2 | ..... | recordN |
109+
* @endcode
110110
*/
111111
class RecordPageHandler
112112
{

0 commit comments

Comments
 (0)
Please sign in to comment.