Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
oceanbase
oceanbase
提交
d4c5f954
O
oceanbase
项目概览
oceanbase
/
oceanbase
大约 1 年 前同步成功
通知
261
Star
6084
Fork
1301
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
oceanbase
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d4c5f954
编写于
2月 06, 2023
作者:
S
simonjoylet
提交者:
ob-robot
2月 06, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
use arena allocator for btree node
上级
8f24b95a
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
5 addition
and
8 deletion
+5
-8
src/storage/ddl/ob_tablet_ddl_kv.cpp
src/storage/ddl/ob_tablet_ddl_kv.cpp
+4
-4
src/storage/ddl/ob_tablet_ddl_kv.h
src/storage/ddl/ob_tablet_ddl_kv.h
+1
-1
unittest/storage/ddl/test_ddl_kv.cpp
unittest/storage/ddl/test_ddl_kv.cpp
+0
-3
未找到文件。
src/storage/ddl/ob_tablet_ddl_kv.cpp
浏览文件 @
d4c5f954
...
...
@@ -39,7 +39,7 @@ using namespace oceanbase::share::schema;
ObBlockMetaTree
::
ObBlockMetaTree
()
:
is_inited_
(
false
),
fifo_allocator_
(),
tree_allocator_
(
fifo_allocator
_
),
block_tree_
(
tree_allocator_
)
:
is_inited_
(
false
),
arena_
(),
tree_allocator_
(
arena
_
),
block_tree_
(
tree_allocator_
)
{
}
...
...
@@ -62,8 +62,7 @@ int ObBlockMetaTree::init(const share::ObLSID &ls_id,
}
else
if
(
OB_UNLIKELY
(
!
ls_id
.
is_valid
()
||
!
table_key
.
is_valid
()
||
cluster_version
<=
0
))
{
ret
=
OB_INVALID_ARGUMENT
;
LOG_WARN
(
"invalid argument"
,
K
(
ret
),
K
(
table_key
));
}
else
if
(
OB_FAIL
(
fifo_allocator_
.
init
(
ObMallocAllocator
::
get_instance
(),
OB_MALLOC_MIDDLE_BLOCK_SIZE
,
mem_attr
)))
{
LOG_WARN
(
"init fifo allocator failed"
,
K
(
ret
));
}
else
if
(
FALSE_IT
(
arena_
.
set_attr
(
mem_attr
)))
{
}
else
if
(
OB_FAIL
(
block_tree_
.
init
()))
{
LOG_WARN
(
"init block tree failed"
,
K
(
ret
));
}
else
if
(
OB_FAIL
(
ObTabletDDLUtil
::
prepare_index_data_desc
(
ls_id
,
...
...
@@ -160,7 +159,8 @@ void ObBlockMetaTree::destroy()
block_tree_
.
destroy
();
data_desc_
.
reset
();
sorted_rowkeys_
.
reset
();
fifo_allocator_
.
reset
();
tree_allocator_
.
reset
();
arena_
.
reset
();
}
int
ObBlockMetaTree
::
insert_macro_block
(
const
ObDDLMacroHandle
&
macro_handle
,
...
...
src/storage/ddl/ob_tablet_ddl_kv.h
浏览文件 @
d4c5f954
...
...
@@ -98,7 +98,7 @@ private:
private:
bool
is_inited_
;
ObArray
<
ObDDLMacroHandle
>
macro_blocks_
;
Ob
FIFOAllocator
fifo_allocator
_
;
Ob
ArenaAllocator
arena
_
;
BtreeNodeAllocator
tree_allocator_
;
KeyBtree
block_tree_
;
blocksstable
::
ObDataStoreDesc
data_desc_
;
...
...
unittest/storage/ddl/test_ddl_kv.cpp
浏览文件 @
d4c5f954
...
...
@@ -132,9 +132,6 @@ void TestBlockMetaTree::prepare_schema()
TEST_F
(
TestBlockMetaTree
,
random_keybtree
)
{
ObBlockMetaTree
meta_tree
;
ObArenaAllocator
arena
;
const
ObMemAttr
mem_attr
(
TEST_TENANT_ID
,
"DDL_KV"
);
ASSERT_OK
(
meta_tree
.
fifo_allocator_
.
init
(
&
arena
,
OB_MALLOC_MIDDLE_BLOCK_SIZE
,
mem_attr
));
LOG_INFO
(
"wenqu debug: check size"
,
"sizeof(BtreeNode)"
,
sizeof
(
keybtree
::
BtreeNode
<
blocksstable
::
ObDatumRowkeyWrapper
,
const
blocksstable
::
ObDataMacroBlockMeta
*>
),
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录