Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
画布下的乐园
oceanbase
提交
ef6584d4
O
oceanbase
项目概览
画布下的乐园
/
oceanbase
与 Fork 源项目一致
Fork自
oceanbase / oceanbase
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
oceanbase
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
ef6584d4
编写于
11月 02, 2022
作者:
H
HaHaJeff
提交者:
wangzelin.wzl
11月 02, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fixed remove_lsn can not finished because palf leak.
上级
1b4fe9e8
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
17 addition
and
6 deletion
+17
-6
src/logservice/ob_log_handler.cpp
src/logservice/ob_log_handler.cpp
+3
-0
src/logservice/ob_log_service.cpp
src/logservice/ob_log_service.cpp
+10
-4
src/logservice/ob_log_service.h
src/logservice/ob_log_service.h
+3
-1
src/storage/ls/ob_ls.cpp
src/storage/ls/ob_ls.cpp
+1
-1
未找到文件。
src/logservice/ob_log_handler.cpp
浏览文件 @
ef6584d4
...
...
@@ -167,6 +167,9 @@ void ObLogHandler::destroy()
apply_status_
=
NULL
;
apply_service_
=
NULL
;
replay_service_
=
NULL
;
if
(
true
==
palf_handle_
.
is_valid
())
{
palf_env_
->
close
(
palf_handle_
);
}
lc_cb_
=
NULL
;
rpc_proxy_
=
NULL
;
palf_env_
=
NULL
;
...
...
src/logservice/ob_log_service.cpp
浏览文件 @
ef6584d4
...
...
@@ -311,7 +311,9 @@ int ObLogService::create_ls(const share::ObLSID &id,
return
ret
;
}
int
ObLogService
::
remove_ls
(
const
ObLSID
&
id
)
int
ObLogService
::
remove_ls
(
const
ObLSID
&
id
,
ObLogHandler
&
log_handler
,
ObLogRestoreHandler
&
restore_handler
)
{
int
ret
=
OB_SUCCESS
;
if
(
IS_NOT_INIT
)
{
...
...
@@ -322,10 +324,14 @@ int ObLogService::remove_ls(const ObLSID &id)
}
else
if
(
OB_FAIL
(
replay_service_
.
remove_ls
(
id
)))
{
CLOG_LOG
(
WARN
,
"failed to remove from replay_service"
,
K
(
ret
),
K
(
id
));
// NB: remove palf_handle lastly.
}
else
if
(
OB_FAIL
(
palf_env_
->
remove
(
id
.
id
())))
{
CLOG_LOG
(
WARN
,
"failed to remove from palf_env_"
,
K
(
ret
),
K
(
id
));
}
else
{
FLOG_INFO
(
"ObLogService remove_ls success"
,
K
(
ret
),
K
(
id
));
log_handler
.
destroy
();
restore_handler
.
destroy
();
if
(
OB_FAIL
(
palf_env_
->
remove
(
id
.
id
())))
{
CLOG_LOG
(
WARN
,
"failed to remove from palf_env_"
,
K
(
ret
),
K
(
id
));
}
else
{
FLOG_INFO
(
"ObLogService remove_ls success"
,
K
(
ret
),
K
(
id
));
}
}
return
ret
;
...
...
src/logservice/ob_log_service.h
浏览文件 @
ef6584d4
...
...
@@ -122,7 +122,9 @@ public:
ObLogRestoreHandler
&
restore_handler
);
//删除日志流接口:外层调用create_ls()之后,后续流程失败,需要调用remove_ls()
int
remove_ls
(
const
share
::
ObLSID
&
id
);
int
remove_ls
(
const
share
::
ObLSID
&
id
,
ObLogHandler
&
log_handler
,
ObLogRestoreHandler
&
restore_handler
);
int
check_palf_exist
(
const
share
::
ObLSID
&
id
,
bool
&
exist
)
const
;
//宕机重启恢复日志流接口,包括生成并初始化对应的ObReplayStatus结构
...
...
src/storage/ls/ob_ls.cpp
浏览文件 @
ef6584d4
...
...
@@ -329,7 +329,7 @@ int ObLS::remove_ls()
if
(
OB_TMP_FAIL
(
log_handler_
.
unregister_rebuild_cb
()))
{
LOG_WARN
(
"unregister rebuild cb failed"
,
K
(
ret
),
K
(
ls_meta_
));
}
if
(
OB_FAIL
(
logservice
->
remove_ls
(
ls_meta_
.
ls_id_
)))
{
if
(
OB_FAIL
(
logservice
->
remove_ls
(
ls_meta_
.
ls_id_
,
log_handler_
,
restore_handler_
)))
{
LOG_ERROR
(
"remove log stream from logservice failed"
,
K
(
ret
),
K
(
ls_meta_
.
ls_id_
));
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录