Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

持久化功能 #376

Merged
merged 88 commits into from
Apr 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
ce3d302
clog codes
hnwyllmm Jan 31, 2024
b54b073
优化一些错误码
hnwyllmm Jan 31, 2024
0048f66
clog unittest
hnwyllmm Jan 31, 2024
bf5eaf0
fix one compile bug on gcc
hnwyllmm Jan 31, 2024
28fe2f2
remove unused files
hnwyllmm Jan 31, 2024
98edbd4
log file 单测通过
hnwyllmm Jan 31, 2024
52e7a1c
clog unittest pass
hnwyllmm Jan 31, 2024
afbcd16
disk buffer pool 支持 wal
hnwyllmm Feb 1, 2024
6021b0a
buffer pool 增加 WAL 单测通过
hnwyllmm Feb 1, 2024
04ac77f
durability-bufferpool
hnwyllmm Feb 2, 2024
89eed6f
record manager 支持WAL,编译通过
hnwyllmm Feb 2, 2024
190adf7
record manager 单测通过
hnwyllmm Feb 4, 2024
ed37d4a
readonly 使用ReadWriteMode 枚举值替换
hnwyllmm Feb 4, 2024
04e6dc9
clog dump 程序
hnwyllmm Feb 4, 2024
f1bf3c2
记录一个TODO
hnwyllmm Feb 5, 2024
7ffa11b
Merge pull request #3 from hnwyllmm/durability-record-manager
hnwyllmm Feb 5, 2024
7dbc8d7
attr printer 转换为字符串的操作改成用value的to_string()
hnwyllmm Feb 5, 2024
0fa623f
buffer pool manager instance 改成使用GCTX获取
hnwyllmm Feb 5, 2024
f896dcf
接口使用mini trans替换latch memo
hnwyllmm Feb 6, 2024
ee8d05f
B+ 树持久化:支持rollback,记录redo日志;
hnwyllmm Feb 20, 2024
13ad8af
replay
hnwyllmm Feb 21, 2024
fa14c8d
rollback
hnwyllmm Feb 21, 2024
5875406
bplus tree持久化增加简单单测;
hnwyllmm Feb 21, 2024
6e7f17a
使用buffer pool id 替换file_desc
hnwyllmm Feb 22, 2024
8bfe078
compile on gcc
hnwyllmm Feb 22, 2024
3ea5aed
fix: use buffer pool id instead of file_desc
hnwyllmm Feb 23, 2024
8c02b41
bplus_tree_log_test passed
hnwyllmm Feb 27, 2024
09f92f2
bplus tree log 打印page num问题修复
hnwyllmm Feb 27, 2024
55cc59e
bplus tree log 增加并发测试用例
hnwyllmm Feb 27, 2024
072945f
Durability bplus tree (#4)
hnwyllmm Feb 28, 2024
d63abc6
事务相关的持久化:
hnwyllmm Mar 4, 2024
9e78712
Merge branch 'main' into durability-trx
hnwyllmm Mar 4, 2024
4d80116
fix table create error
hnwyllmm Mar 4, 2024
efb2a56
Merge branch 'main' into durability-trx
hnwyllmm Mar 4, 2024
d5a95d8
安装一些必备软件
hnwyllmm Mar 5, 2024
86d7f99
同步main分支,删除不必要的安装
hnwyllmm Mar 5, 2024
70acbd4
写日志每次都刷到磁盘比较慢
hnwyllmm Mar 6, 2024
8c00625
增加Queue size 接口
hnwyllmm Mar 6, 2024
7a89312
日志wait刷新减少sleep 时间,提高效率
hnwyllmm Mar 6, 2024
144608e
clog 增加 mvcc trx log 格式化输出
hnwyllmm Mar 6, 2024
6e04a3d
事务日志单元测试通过
hnwyllmm Mar 6, 2024
b76305a
create table attributes使用span替代数组
hnwyllmm Mar 6, 2024
112ec76
move externalConsole into osx section
hnwyllmm Mar 12, 2024
edf0f70
消除trx内存泄露
hnwyllmm Mar 12, 2024
36305b4
session指针修改为unique_ptr
hnwyllmm Mar 12, 2024
09232f5
增加是否DDL语句的判断
hnwyllmm Mar 12, 2024
d7778f4
Durability trx (#5)
hnwyllmm Mar 12, 2024
71514fa
增加关于事务日志相关的注释
hnwyllmm Mar 13, 2024
e7d66d5
删除不再使用的代码
hnwyllmm Mar 13, 2024
0e147f2
增加代码注释
hnwyllmm Mar 13, 2024
806f8c2
修复编译问题
hnwyllmm Mar 13, 2024
d99d394
修复编译问题
hnwyllmm Mar 13, 2024
204cd68
修复初始化的问题
hnwyllmm Mar 15, 2024
b8d5958
1. 支持指定持久化的类型;
hnwyllmm Mar 19, 2024
e53f085
sysbench 测试增加重启再测试的步骤
hnwyllmm Mar 19, 2024
1f0a40e
增加日志文档
hnwyllmm Mar 20, 2024
f9c7a7d
1. 修复重启恢复时没有调用replayer on_done接口的错误;
hnwyllmm Mar 20, 2024
fd5e874
Durability doc (#6)
hnwyllmm Mar 20, 2024
6714464
docs
hnwyllmm Apr 8, 2024
56ae98d
更新首页
hnwyllmm Apr 12, 2024
ae7b16b
更新文档
hnwyllmm Apr 15, 2024
a691d10
Durability doc (#7)
hnwyllmm Apr 15, 2024
177647b
增加架构文档链接
hnwyllmm Apr 15, 2024
6af83fd
Merge branch 'upstream_main' into durability
hnwyllmm Apr 15, 2024
175f449
修复double write buffer 在关闭buffer pool时未清理相关page的问题
hnwyllmm Apr 15, 2024
a199eee
需改double write buffer,增加vacuous double write buffer,以方便单元测试
hnwyllmm Apr 16, 2024
425bc5e
fix compile error
hnwyllmm Apr 16, 2024
35b31ac
fix bpm init error
hnwyllmm Apr 16, 2024
b5a01fc
fix bplus_tree_log_test
hnwyllmm Apr 17, 2024
9d27177
revert debug code
hnwyllmm Apr 17, 2024
84385ee
fix memory overflow
hnwyllmm Apr 18, 2024
90bee58
持久化代码合并double write buffer后测试 (#8)
hnwyllmm Apr 18, 2024
2f227b8
Merge branch 'main' into durability
hnwyllmm Apr 18, 2024
c5d45d0
fix compile error; clang-format crc.cpp
hnwyllmm Apr 18, 2024
3ab9883
clang-format
hnwyllmm Apr 18, 2024
46b949a
clang-format (#9)
hnwyllmm Apr 18, 2024
d242b46
double write buffer unittest
hnwyllmm Apr 19, 2024
6f683b2
add logs
hnwyllmm Apr 19, 2024
cfda522
double write buffer unittest
hnwyllmm Apr 19, 2024
105d715
add logs
hnwyllmm Apr 19, 2024
9c0d896
测试sysbench (#10)
hnwyllmm Apr 22, 2024
38cf694
build with CONCURRENCY when doing unittest
hnwyllmm Apr 22, 2024
9bb1458
fix compile error on mac
hnwyllmm Apr 22, 2024
0d1290b
clang-format
hnwyllmm Apr 22, 2024
cfba675
fix compile on MAC
hnwyllmm Apr 22, 2024
0c8da76
fix compile on MAC
hnwyllmm Apr 22, 2024
0f21119
删除无用的接口
hnwyllmm Apr 28, 2024
977b7f7
add asan options when build release unittest
hnwyllmm Apr 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

- name: BuildDebug
shell: bash
run: bash build.sh debug -DENABLE_COVERAGE=ON --make -j4
run: bash build.sh debug -DCONCURRENCY=ON -DENABLE_COVERAGE=ON --make -j4

- name: Test
shell: bash
Expand Down Expand Up @@ -65,4 +65,7 @@ jobs:

- name: Build
shell: bash
run: sudo bash build.sh init && bash build.sh release --make -j4
run: |
export ASAN_OPTIONS=detect_container_overflow=0
sudo bash build.sh init
bash build.sh release --make -j4
37 changes: 30 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: test

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

Expand All @@ -25,7 +23,6 @@ jobs:
echo "begin test..."
python3 test/case/miniob_test.py --test-cases=basic | tail -1 | grep "basic is success"

# sysbench cannot work property on this platform.
# I found that sysbench would send more request before receiving last response
sysbench-test:
strategy:
Expand All @@ -45,22 +42,48 @@ jobs:
sudo bash script.deb.sh
sudo apt -y install sysbench mariadb-client

- name: start server
- name: build miniob
shell: bash
run: |
sudo bash build.sh init
bash build.sh release -DCONCURRENCY=ON -DWITH_UNIT_TESTS=OFF
nohup ./build_release/bin/observer -T ${{ matrix.thread_model }} -s /tmp/miniob.sock -f etc/observer.ini -P mysql -t mvcc &

- name: start server
shell: bash
run: |
nohup ./build_release/bin/observer -T ${{ matrix.thread_model }} -s /tmp/miniob.sock -f etc/observer.ini -P mysql -t mvcc -d disk &
sleep 10 && echo "wake up"
mysql --version
mysql -S /tmp/miniob.sock -e "show tables"

# error number 41 is LOCKED_CONCURRENCY_CONFLICT
# we should change the error number if we update the code
- name: sysbench test
shell: bash
run: |
cd test/sysbench
sysbench --mysql-socket=/tmp/miniob.sock --threads=10 ${{ matrix.test_case }} prepare
sysbench --mysql-socket=/tmp/miniob.sock --threads=10 ${{ matrix.test_case }} run
sysbench --mysql-socket=/tmp/miniob.sock --mysql-ignore-errors=41 --threads=10 ${{ matrix.test_case }} prepare
sysbench --mysql-socket=/tmp/miniob.sock --mysql-ignore-errors=41 --threads=10 ${{ matrix.test_case }} run

- name: stop server
shell: bash
run: |
mysql -S /tmp/miniob.sock -e "create table t(id int)"
mysql -S /tmp/miniob.sock -e "show tables"
killall observer

- name: restart server
shell: bash
run: |
nohup ./build_release/bin/observer -T ${{ matrix.thread_model }} -s /tmp/miniob.sock -f etc/observer.ini -P mysql -t mvcc -d disk &
sleep 10 && echo "wake up"
mysql -S /tmp/miniob.sock -e "show tables"

- name: sysbench test again
shell: bash
run: |
cd test/sysbench
sysbench --mysql-socket=/tmp/miniob.sock --mysql-ignore-errors=41 --threads=10 ${{ matrix.test_case }} run

benchmark-test:
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
.vscode
!.vscode/tasks.json
!.vscode/launch.json
.VSCodeCounter/*
./docs/doxy/
build/*
build_*
Expand Down
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
"program": "${workspaceFolder}/${defaultBuildTask}/bin/observer",
"args": ["-f", "${workspaceFolder}/etc/observer.ini", "-P", "cli"],
"cwd": "${workspaceFolder}/${defaultBuildTask}/",
"externalConsole":true,
"internalConsoleOptions": "openOnSessionStart",
"osx": {
"MIMode": "lldb"
"MIMode": "lldb",
"externalConsole":true
}
},
{
Expand Down
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ OPTION(ENABLE_UBSAN "Build with undefined behavior sanitizer" OFF)
OPTION(WITH_UNIT_TESTS "Compile miniob with unit tests" ON)
OPTION(WITH_BENCHMARK "Compile benchmark" OFF)
OPTION(ENABLE_COVERAGE "Enable unittest coverage" OFF)
OPTION(ENABLE_NOPIE "Enable no pie" OFF)
OPTION(CONCURRENCY "Support concurrency operations" OFF)
OPTION(STATIC_STDLIB "Link std library static or dynamic, such as libgcc, libstdc++, libasan" OFF)

Expand All @@ -40,6 +41,11 @@ ENDIF(WIN32)

# This is for clangd plugin for vscode
SET(CMAKE_COMMON_FLAGS "${CMAKE_COMMON_FLAGS} -Wall -Werror")
IF (ENABLE_NOPIE)
SET(CMAKE_COMMON_FLAGS "${CMAKE_COMMON_FLAGS} -no-pie")
ADD_LINK_OPTIONS(-no-pie)
ENDIF (ENABLE_NOPIE)

IF(DEBUG)
MESSAGE(STATUS "DEBUG has been set as TRUE ${DEBUG}")
SET(CMAKE_COMMON_FLAGS "${CMAKE_COMMON_FLAGS} -O0 -g -DDEBUG ")
Expand Down
53 changes: 25 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
<div align="center">
# MiniOB 介绍

<div align="left">

[![Chinese Doc](https://img.shields.io/badge/文档-简体中文-blue)](https://oceanbase.github.io/miniob/miniob-introduction.html)
[![MiniOB stars](https://img.shields.io/badge/dynamic/json?color=blue&label=stars&query=stargazers_count&url=https%3A%2F%2Fapi.github.com%2Frepos%2Foceanbase%2Fminiob)](https://github.com/oceanbase/miniob)
[![Coverage Status](https://codecov.io/gh/oceanbase/miniob/branch/main/graph/badge.svg)](https://codecov.io/gh/oceanbase/miniob)

</div>

# MiniOB 概述

MiniOB 是 [OceanBase](https://github.com/oceanbase/oceanbase) 团队基于华中科技大学数据库课程原型,联合多所高校重新开发的、专为零基础的同学设计的数据库入门学习项目。我们的目标是为在校学生、数据库从业者、爱好者或对基础技术感兴趣的人提供一个友好的数据库学习项目。
MiniOB 是 [OceanBase](https://github.com/oceanbase/oceanbase) 团队基于华中科技大学数据库课程原型,联合多所高校重新开发的、专为零基础的同学设计的数据库入门学习项目。MiniOB 的目标是为在校学生、数据库从业者、爱好者或对基础技术感兴趣的人提供一个友好的数据库学习项目,更好地将理论、实践进行结合,提升同学们的工程实战能力。

MiniOB 整体代码简洁,容易上手,设计了一系列由浅入深的题目,帮助同学们从零基础入门,迅速了解数据库并深入学习数据库内核。MiniOB 简化了许多模块,例如不考虑并发操作、安全特性和复杂的事务管理等功能,以便更好地学习数据库实现原理。我们期望通过 MiniOB 的训练,同学们能够熟练掌握数据库内核模块的功能和协同关系,并具备一定的工程编码能力,例如内存管理、网络通信和磁盘 I/O 处理等, 这将有助于同学在未来的面试和工作中脱颖而出。

# [文档](https://oceanbase.github.io/miniob/)
代码配套文档和相关代码注释已经生成文档,并通过 GitHub Pages 发布。您可以直接访问:[MiniOB GitHub Pages](https://oceanbase.github.io/miniob/).
代码配套设计文档和相关代码注释已经生成文档,并通过 GitHub Pages 发布。您可以直接访问:[MiniOB GitHub Pages](https://oceanbase.github.io/miniob/).

## 快速上手

Expand Down Expand Up @@ -40,16 +42,16 @@ MiniOB 整体架构如下图所示:

- SQL解析:将用户输入的SQL语句解析成语法树;

- 执行计划缓存:执行计划缓存模块会将该 SQL第一次生成的执行计划缓存在内存中,后续的执行可以反复执行这个计划,避免了重复查询优化的过程(未实现)。

- 语义解析模块:将生成的语法树,转换成数据库内部数据结构(部分实现);

- 查询缓存:将执行的查询结果缓存在内存中,下次查询时,可以直接返回(未实现);
- 语义解析模块:将生成的语法树,转换成数据库内部数据结构;

- 查询优化:根据一定规则和统计数据,调整/重写语法树。(部分实现);

- 计划执行:根据语法树描述,执行并生成结果;

- 存储引擎:负责数据的存储和检索;

- 事务管理:管理事务的提交、回滚、隔离级别等;

- 会话管理:管理用户连接、调整某个连接的参数;

- 元数据管理:记录当前的数据库、表、字段和索引元数据信息;
Expand All @@ -59,43 +61,38 @@ MiniOB 整体架构如下图所示:

# [OceanBase 大赛](https://open.oceanbase.com/competition)

2022 OceanBase 数据库大赛是由中国计算机学会(CCF)数据库专业委员会指导,OceanBase 与蚂蚁技术研究院学术合作团队联合举办的数据库内核实战赛事。本次大赛主要面向全国爱好数据库的高校学生,以“竞技、交流、成长”为宗旨,搭建基于赛事的技术交流平台,促进高校创新人才培养机制,不仅帮助学生从0开始系统化学习数据库理论知识,提升学生数据库实践能力,更能帮助学生走向企业积累经验,促进国内数据库人才的发展,碰撞出创新的火花。
全国大学生计算机系统能力大赛(以下简称“大赛”)是由系统能力培养研究专家组发起,全国高等学校计算机教育研究会、系统能力培养研究项目示范高校共同主办、OceanBase 承办,面向高校大学生的全国性数据库大赛。
大赛面向全国爱好数据库的高校学生,以“竞技、交流、成长”为宗旨,搭建基于赛事的技术交流平台,促进高校创新人才培养机制,不仅帮助学生从0开始系统化学习 OceanBase 数据库理论知识,提升学生数据库实践能力,更能帮助学生走向企业积累经验,促进国内数据库人才的发展,碰撞出创新的火花。

OceanBase 初赛基于一套适合初学者实践的数据库实训平台 MiniOB,代码量少,易于上手学习,包含了数据库的各个关键模块,是一个系统性的数据库学习平台。基于该平台设置了一系列由浅入深的题目,以帮助同学们更好"零"基础入门。

2023 OceanBase 数据库大赛正在火热进行, 更多详情, 请参考 [OceanBase 大赛](https://open.oceanbase.com/competition/index)

### 1. 大赛手把手入门教程
为了帮助大家能在大赛中取得好成绩,我们提供了一系列的教程和指导,帮助大家更好地学习数据库基础知识,更好地完成大赛题目
欢迎大家查看[《从0到1数据库内核实战教程》 视频教程](https://open.oceanbase.com/activities/4921877?id=4921946),视频中包含了代码框架的介绍和一些入门题目的讲解。
> 由于MiniOB是一个持续演进的产品,视频教程中有些内容会与最新代码有冲突,建议大家参考讲解中的思路。

[大赛入门教程](https://oceanbase.github.io/miniob/game/gitee-instructions.html)

### 2. 大赛赛题

[赛题介绍](https://oceanbase.github.io/miniob/game/miniob_topics.html)

### 3. 提交测试

题目完成并通过自测后,大家可以在 [MiniOB 训练营](https://open.oceanbase.com/train?questionId=500003) 上提交代码进行测试。
大赛的初赛是在MiniOB上进行的,同学们可以在前几届的题目上进行提前训练,可以让自己比别人提前一步。大家在日常训练时可以在[MiniOB 训练营](https://open.oceanbase.com/train?questionId=500003) 上提交代码进行测试。

在提交前, 请参考并学习 [训练营使用说明](https://ask.oceanbase.com/t/topic/35600372)。

### 4. 大赛FAQ

[大赛 FAQ ](https://ask.oceanbase.com/t/topic/35601465)
如果大家在大赛中或使用训练营时遇到一些问题,请先查看[大赛 FAQ](https://ask.oceanbase.com/t/topic/35601465)。

# 在线开发平台

本仓库基于 Gitpod 建立了快速在线开发平台。点击下面的按钮即可一键体验(建议使用 Chrome 浏览器)。
搭建开发环境是一个比较耗时而且繁琐的事情,特别是对于初学者。为了让大家更快地上手 MiniOB,本仓库基于 Gitpod 建立了快速在线开发平台。点击下面的按钮即可一键体验(建议使用 Chrome 浏览器)。

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/oceanbase/miniob)

> 注意:这个链接打开的是MiniOB主仓库的开发环境,同学们需要通过gitpod进入自己的仓库开发环境。

首次进入 Gitpod 时需要安装一些依赖。安装完成后,终端界面会显示 "Dependency installed successfully"。运行 `bash build.sh --make -j4` 命令即可编译 MiniOB。

# Contributing

OceanBase 社区热情欢迎每一位对数据库技术热爱的开发者,期待与您携手开启思维碰撞之旅。无论是文档格式调整或文字修正、问题修复还是增加新功能,都是参与和贡献 OceanBase 社区的方式之一。现在就开始您的首次贡献吧!更多详情,请参考 [社区贡献](CONTRIBUTING.md).
OceanBase 社区热情欢迎每一位对数据库技术热爱的开发者,期待与您携手开启思维碰撞之旅。无论是文档格式调整或文字修正、问题修复还是增加新功能,都是参与和贡献 OceanBase 社区的方式之一。MiniOB 现在开放了一些[新功能的开发](https://github.com/oceanbase/miniob/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22),欢迎有兴趣的同学一起共建,希望我们共同成长。如果你对MiniOB不熟悉也没关系,可以直接联系我们,我们将会有人指导上手。现在就开始您的首次贡献吧!更多详情,请参考 [社区贡献](CONTRIBUTING.md)

# Contributors
感谢所有为 MiniOB 项目做出贡献的同学们!

<a href="https://github.com/oceanbase/miniob/graphs/contributors"><img src="https://contributors-img.web.app/image?repo=oceanbase/miniob&width=890" /></a>

# License
Expand Down
22 changes: 12 additions & 10 deletions benchmark/bplus_tree_concurrency_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,13 @@ See the Mulan PSL v2 for more details. */
#include "common/math/integer_generator.h"
#include "storage/buffer/disk_buffer_pool.h"
#include "storage/index/bplus_tree.h"
#include "storage/clog/vacuous_log_handler.h"
#include "storage/buffer/double_write_buffer.h"

using namespace std;
using namespace common;
using namespace benchmark;

once_flag init_bpm_flag;
BufferPoolManager bpm{512};

struct Stat
{
int64_t insert_success_count = 0;
Expand All @@ -48,7 +47,7 @@ class BenchmarkBase : public Fixture
public:
BenchmarkBase() {}

virtual ~BenchmarkBase() { BufferPoolManager::set_instance(nullptr); }
virtual ~BenchmarkBase() {}

virtual string Name() const = 0;

Expand All @@ -58,25 +57,26 @@ class BenchmarkBase : public Fixture
return;
}

bpm_.init(make_unique<VacuousDoubleWriteBuffer>());

string log_name = this->Name() + ".log";
string btree_filename = this->Name() + ".btree";
LoggerFactory::init_default(log_name.c_str(), LOG_LEVEL_TRACE);

std::call_once(init_bpm_flag, []() { BufferPoolManager::set_instance(&bpm); });

::remove(btree_filename.c_str());

const int internal_max_size = 200;
const int leaf_max_size = 200;

const char *filename = btree_filename.c_str();

RC rc = handler_.create(filename, INTS, sizeof(int32_t) /*attr_len*/, internal_max_size, leaf_max_size);
RC rc = handler_.create(
log_handler_, bpm_, filename, INTS, sizeof(int32_t) /*attr_len*/, internal_max_size, leaf_max_size);
if (rc != RC::SUCCESS) {
throw runtime_error("failed to create btree handler");
}
LOG_INFO(
"test %s setup done. threads=%d, thread index=%d", this->Name().c_str(), state.threads(), state.thread_index());
LOG_INFO("test %s setup done. threads=%d, thread index=%d",
this->Name().c_str(), state.threads(), state.thread_index());
}

virtual void TearDown(const State &state)
Expand Down Expand Up @@ -181,7 +181,9 @@ class BenchmarkBase : public Fixture
}

protected:
BplusTreeHandler handler_;
BufferPoolManager bpm_{512};
BplusTreeHandler handler_;
VacuousLogHandler log_handler_;
};

////////////////////////////////////////////////////////////////////////////////
Expand Down
Loading
Loading