Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
大炮V587
oceanbase
提交
10552696
O
oceanbase
项目概览
大炮V587
/
oceanbase
与 Fork 源项目一致
Fork自
oceanbase / oceanbase
通知
1
Star
0
Fork
0
代码
文件
提交
分支
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,发现更多精彩内容 >>
提交
10552696
编写于
12月 09, 2022
作者:
O
obdev
提交者:
ob-robot
1月 12, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
reset macro handle after each write
上级
7b5077cb
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
17 addition
and
13 deletion
+17
-13
src/storage/blocksstable/ob_shared_macro_block_manager.cpp
src/storage/blocksstable/ob_shared_macro_block_manager.cpp
+16
-11
src/storage/blocksstable/ob_shared_macro_block_manager.h
src/storage/blocksstable/ob_shared_macro_block_manager.h
+0
-1
src/storage/ls/ob_ls_tablet_service.cpp
src/storage/ls/ob_ls_tablet_service.cpp
+1
-1
未找到文件。
src/storage/blocksstable/ob_shared_macro_block_manager.cpp
浏览文件 @
10552696
...
...
@@ -200,12 +200,14 @@ int ObSharedMacroBlockMgr::write_block(
write_info
.
offset_
=
offset_
;
if
(
OB_FAIL
(
do_write_block
(
write_info
,
block_info
)))
{
LOG_WARN
(
"fail to do write block"
,
K
(
ret
),
K
(
write_info
),
K
(
block_info
));
}
else
if
(
FALSE_IT
(
write_ctx
.
reset
()))
{
}
else
if
(
OB_FAIL
(
write_ctx
.
add_macro_block_id
(
macro_handle_
.
get_macro_id
())))
{
LOG_WARN
(
"fail to add macro block id into write_ctx"
,
K
(
ret
),
K
(
macro_handle_
.
get_macro_id
()),
K
(
write_ctx
));
}
else
{
FLOG_INFO
(
"successfully write small sstable"
,
K
(
ret
),
K
(
block_info
),
K
(
offset_
));
FLOG_INFO
(
"successfully write small sstable"
,
K
(
ret
),
K
(
write_ctx
.
get_macro_block_list
()),
K
(
block_info
),
K
(
offset_
));
write_ctx
.
reset
();
if
(
OB_FAIL
(
write_ctx
.
add_macro_block_id
(
macro_handle_
.
get_macro_id
())))
{
LOG_WARN
(
"fail to add macro block id into write_ctx"
,
K
(
ret
),
K
(
macro_handle_
.
get_macro_id
()),
K
(
write_ctx
));
}
}
}
}
...
...
@@ -218,21 +220,24 @@ int ObSharedMacroBlockMgr::do_write_block(
ObBlockInfo
&
block_info
)
{
int
ret
=
OB_SUCCESS
;
ObMacroBlockHandle
write_macro_handle
;
const
int64_t
io_timeout_ms
=
std
::
max
(
GCONF
.
_data_storage_io_timeout
/
1000
,
DEFAULT_IO_WAIT_TIME_MS
);
if
(
OB_FAIL
(
macro_handle_
.
async_write
(
write_info
)))
{
LOG_WARN
(
"fail to async write virtual macro block"
,
K
(
ret
),
K
(
macro_handle_
));
}
else
if
(
OB_FAIL
(
macro_handle_
.
wait
(
io_timeout_ms
)))
{
if
(
OB_FAIL
(
write_macro_handle
.
set_macro_block_id
(
macro_handle_
.
get_macro_id
())))
{
LOG_WARN
(
"fail to set macro block id"
,
K
(
ret
),
K
(
macro_handle_
.
get_macro_id
()));
}
else
if
(
OB_FAIL
(
write_macro_handle
.
async_write
(
write_info
)))
{
LOG_WARN
(
"fail to async write virtual macro block"
,
K
(
ret
),
K
(
write_macro_handle
));
}
else
if
(
OB_FAIL
(
write_macro_handle
.
wait
(
io_timeout_ms
)))
{
LOG_WARN
(
"fail to wait previous io"
,
K
(
ret
),
K
(
io_timeout_ms
));
}
else
if
(
!
macro_handle_
.
is_empty
()
&&
MICRO_BLOCK_MERGE_VERIFY_LEVEL
::
ENCODING_AND_COMPRESSION_AND_WRITE_COMPLETE
==
}
else
if
(
!
write_macro_handle
.
is_empty
()
&&
MICRO_BLOCK_MERGE_VERIFY_LEVEL
::
ENCODING_AND_COMPRESSION_AND_WRITE_COMPLETE
==
GCONF
.
micro_block_merge_verify_level
&&
0
!=
offset_
)
{
if
(
OB_FAIL
(
check_write_complete
(
macro_handle_
.
get_macro_id
(),
write_info
.
size_
)))
{
if
(
OB_FAIL
(
check_write_complete
(
write_macro_handle
.
get_macro_id
(),
write_info
.
size_
)))
{
LOG_WARN
(
"fail to check write completion"
,
K
(
ret
));
}
}
if
(
OB_SUCC
(
ret
))
{
block_info
.
macro_id_
=
macro_handle_
.
get_macro_id
();
block_info
.
macro_id_
=
write_macro_handle
.
get_macro_id
();
block_info
.
nested_size_
=
write_info
.
size_
;
block_info
.
nested_offset_
=
offset_
;
offset_
+=
write_info
.
size_
;
...
...
src/storage/blocksstable/ob_shared_macro_block_manager.h
浏览文件 @
10552696
...
...
@@ -159,7 +159,6 @@ private:
int
try_switch_macro_block
();
int
check_write_complete
(
const
MacroBlockId
&
macro_id
,
const
int64_t
macro_size
);
int
do_write_block
(
const
ObMacroBlockWriteInfo
&
write_info
,
ObBlockInfo
&
block_info
);
int
init_block
();
DISALLOW_COPY_AND_ASSIGN
(
ObSharedMacroBlockMgr
);
private:
...
...
src/storage/ls/ob_ls_tablet_service.cpp
浏览文件 @
10552696
...
...
@@ -1479,7 +1479,7 @@ int ObLSTabletService::replay_create_tablet(
int
tmp_ret
=
OB_SUCCESS
;
ObTenantMetaMemMgr
*
t3m
=
MTL
(
ObTenantMetaMemMgr
*
);
if
(
OB_TMP_FAIL
(
tablet_id_set_
.
erase
(
tablet_id
)))
{
if
(
OB_HASH_NOT_EXIST
!=
ret
)
{
if
(
OB_HASH_NOT_EXIST
!=
tmp_
ret
)
{
LOG_ERROR
(
"fail to erase tablet id from set"
,
K
(
tmp_ret
),
K
(
tablet_id
));
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录