Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
oceanbase
oceanbase
提交
b3f1ef72
O
oceanbase
项目概览
oceanbase
/
oceanbase
9 个月 前同步成功
通知
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,体验更适合开发者的 AI 搜索 >>
提交
b3f1ef72
编写于
12月 02, 2022
作者:
qq_43633081
提交者:
OB-robot
12月 02, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove sql from ls restore online
上级
64cc4452
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
16 addition
and
28 deletion
+16
-28
src/share/restore/ob_restore_persist_helper.cpp
src/share/restore/ob_restore_persist_helper.cpp
+1
-1
src/storage/restore/ob_ls_restore_handler.cpp
src/storage/restore/ob_ls_restore_handler.cpp
+15
-27
未找到文件。
src/share/restore/ob_restore_persist_helper.cpp
浏览文件 @
b3f1ef72
...
...
@@ -766,7 +766,7 @@ int ObRestorePersistHelper::insert_initial_ls_restore_progress(
LOG_WARN
(
"ObRestorePersistHelper not init"
,
K
(
ret
));
}
else
if
(
OB_FAIL
(
ls_restore_progress_table_operator
.
init
(
OB_ALL_LS_RESTORE_PROGRESS_TNAME
,
*
this
)))
{
LOG_WARN
(
"failed to init ls restore progress table"
,
K
(
ret
));
}
else
if
(
OB_FAIL
(
ls_restore_progress_table_operator
.
insert_row
(
proxy
,
persist_info
,
affected_rows
)))
{
}
else
if
(
OB_FAIL
(
ls_restore_progress_table_operator
.
insert_
or_update_
row
(
proxy
,
persist_info
,
affected_rows
)))
{
LOG_WARN
(
"failed to insert initial ls restore progress"
,
K
(
ret
));
}
...
...
src/storage/restore/ob_ls_restore_handler.cpp
浏览文件 @
b3f1ef72
...
...
@@ -95,12 +95,15 @@ int ObLSRestoreHandler::offline()
if
(
IS_NOT_INIT
)
{
ret
=
OB_NOT_INIT
;
LOG_WARN
(
"not init"
,
K
(
ret
));
}
else
if
(
!
is_online_
)
{
LOG_INFO
(
"ls restore handler is already offline"
);
}
else
{
lib
::
ObMutexGuard
guard
(
mtx_
);
if
(
OB_FAIL
(
cancel_task_
()))
{
LOG_WARN
(
"failed to cancel task"
,
K
(
ret
),
KPC
(
ls_
));
}
else
{
is_online_
=
false
;
LOG_INFO
(
"ls restore handler offline finish"
);
}
}
return
ret
;
...
...
@@ -117,41 +120,26 @@ int ObLSRestoreHandler::online()
LOG_WARN
(
"not init"
,
K
(
ret
));
}
else
if
(
is_online_
)
{
// do nothing
LOG_INFO
(
"ls
is online"
,
KPC
(
ls_
)
);
LOG_INFO
(
"ls
restore handler is already online"
);
}
else
if
(
OB_FAIL
(
ls_
->
get_restore_status
(
new_status
)))
{
LOG_WARN
(
"fail to get_restore_status"
,
K
(
ret
),
KPC
(
ls_
));
}
else
if
(
new_status
.
is_restore_none
())
{
is_online_
=
true
;
}
else
{
lib
::
ObMutexGuard
guard
(
mtx_
);
// online after rebuild or migrate. the restore status may changed.
// so, we refresh the restore state handler according to the new ls restore status.
if
(
OB_FAIL
(
fill_restore_arg_
()))
{
LOG_WARN
(
"fail to fill restore arg"
,
K
(
ret
));
}
else
if
(
OB_FAIL
(
get_restore_state_handler_
(
new_status
,
new_state_handler
)))
{
LOG_WARN
(
"fail to get restore state handler"
,
K
(
ret
),
K
(
new_status
));
}
else
{
if
(
nullptr
!=
state_handler_
)
{
// when online, the old task should be cancel.
if
(
OB_FAIL
(
state_handler_
->
get_tablet_mgr
().
cancel_task
()))
{
LOG_WARN
(
"failed to cancel task"
,
K
(
ret
));
}
else
{
state_handler_
->~
ObILSRestoreState
();
allocator_
.
free
(
state_handler_
);
state_handler_
=
nullptr
;
}
}
if
(
OB_SUCC
(
ret
))
{
state_handler_
=
new_state_handler
;
is_online_
=
true
;
new_state_handler
=
nullptr
;
if
(
nullptr
!=
state_handler_
)
{
// when online, the old task should be cancel.
if
(
OB_FAIL
(
state_handler_
->
get_tablet_mgr
().
cancel_task
()))
{
LOG_WARN
(
"failed to cancel task"
,
K
(
ret
));
}
else
{
state_handler_
->~
ObILSRestoreState
();
allocator_
.
free
(
state_handler_
);
state_handler_
=
nullptr
;
}
}
if
(
OB_FAIL
(
ret
)
&&
nullptr
!=
new_state_handler
)
{
new_state_handler
->~
ObILSRestoreState
();
allocator_
.
free
(
new_state_handler
);
new_state_handler
=
nullptr
;
if
(
OB_SUCC
(
ret
))
{
is_online_
=
true
;
LOG_INFO
(
"ls restore handler online finish"
);
}
}
return
ret
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录