Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
野花太放肆
oceanbase
提交
db8fee3a
O
oceanbase
项目概览
野花太放肆
/
oceanbase
与 Fork 源项目一致
Fork自
oceanbase / oceanbase
通知
1
Star
1
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,体验更适合开发者的 AI 搜索 >>
提交
db8fee3a
编写于
3月 24, 2023
作者:
qq_43633081
提交者:
ob-robot
3月 24, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
delete wait refresh config when start backup or archive
上级
7fd1b058
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
2 addition
and
45 deletion
+2
-45
src/rootserver/ob_root_service.cpp
src/rootserver/ob_root_service.cpp
+2
-44
src/rootserver/ob_root_service.h
src/rootserver/ob_root_service.h
+0
-1
未找到文件。
src/rootserver/ob_root_service.cpp
浏览文件 @
db8fee3a
...
@@ -4733,40 +4733,6 @@ int ObRootService::refresh_config()
...
@@ -4733,40 +4733,6 @@ int ObRootService::refresh_config()
return
ret
;
return
ret
;
}
}
int
ObRootService
::
wait_refresh_config
()
{
int
ret
=
OB_SUCCESS
;
int64_t
lastest_config_version
=
0
;
const
int64_t
retry_time_limit
=
3
;
int64_t
retry_time
=
0
;
const
int64_t
sleep_us
=
1000
*
1000LL
;
// 1s
if
(
!
inited_
)
{
ret
=
OB_NOT_INIT
;
LOG_WARN
(
"not init"
,
K
(
ret
));
}
else
if
(
OB_FAIL
(
zone_manager_
.
get_config_version
(
lastest_config_version
)))
{
LOG_WARN
(
"get_config_version failed"
,
K
(
ret
));
}
else
{
while
(
OB_SUCC
(
ret
))
{
const
int64_t
current_version
=
config_mgr_
->
get_current_version
();
++
retry_time
;
if
(
current_version
>=
lastest_config_version
)
{
break
;
}
else
if
(
retry_time
>
retry_time_limit
)
{
ret
=
OB_CONFIG_NOT_SYNC
;
LOG_ERROR
(
"failed to wait refresh config, config version is too old"
,
K
(
ret
),
K
(
retry_time
),
K
(
retry_time_limit
),
K
(
lastest_config_version
),
K
(
current_version
));
}
else
{
LOG_INFO
(
"config version too old, retry after 1s"
,
K
(
retry_time
),
K
(
retry_time_limit
),
K
(
lastest_config_version
),
K
(
current_version
));
ob_usleep
(
sleep_us
);
}
}
}
return
ret
;
}
int
ObRootService
::
root_minor_freeze
(
const
ObRootMinorFreezeArg
&
arg
)
int
ObRootService
::
root_minor_freeze
(
const
ObRootMinorFreezeArg
&
arg
)
{
{
int
ret
=
OB_SUCCESS
;
int
ret
=
OB_SUCCESS
;
...
@@ -9490,8 +9456,6 @@ int ObRootService::handle_archive_log(const obrpc::ObArchiveLogArg &arg)
...
@@ -9490,8 +9456,6 @@ int ObRootService::handle_archive_log(const obrpc::ObArchiveLogArg &arg)
if
(
!
inited_
)
{
if
(
!
inited_
)
{
ret
=
OB_NOT_INIT
;
ret
=
OB_NOT_INIT
;
LOG_WARN
(
"not init"
,
K
(
ret
));
LOG_WARN
(
"not init"
,
K
(
ret
));
}
else
if
(
OB_FAIL
(
wait_refresh_config
()))
{
LOG_WARN
(
"failed to wait refresh config"
,
K
(
ret
));
}
else
if
(
arg
.
enable_
&&
OB_FAIL
(
archive_service_
.
open_archive_mode
(
arg
.
tenant_id_
,
arg
.
archive_tenant_ids_
)))
{
}
else
if
(
arg
.
enable_
&&
OB_FAIL
(
archive_service_
.
open_archive_mode
(
arg
.
tenant_id_
,
arg
.
archive_tenant_ids_
)))
{
LOG_WARN
(
"failed to open archive mode"
,
K
(
ret
),
K
(
arg
));
LOG_WARN
(
"failed to open archive mode"
,
K
(
ret
),
K
(
arg
));
}
else
if
(
!
arg
.
enable_
&&
OB_FAIL
(
archive_service_
.
close_archive_mode
(
arg
.
tenant_id_
,
arg
.
archive_tenant_ids_
)))
{
}
else
if
(
!
arg
.
enable_
&&
OB_FAIL
(
archive_service_
.
close_archive_mode
(
arg
.
tenant_id_
,
arg
.
archive_tenant_ids_
)))
{
...
@@ -9507,9 +9471,7 @@ int ObRootService::handle_backup_database(const obrpc::ObBackupDatabaseArg &in_a
...
@@ -9507,9 +9471,7 @@ int ObRootService::handle_backup_database(const obrpc::ObBackupDatabaseArg &in_a
if
(
!
inited_
)
{
if
(
!
inited_
)
{
ret
=
OB_NOT_INIT
;
ret
=
OB_NOT_INIT
;
LOG_WARN
(
"not init"
,
K
(
ret
));
LOG_WARN
(
"not init"
,
K
(
ret
));
}
else
if
(
OB_FAIL
(
wait_refresh_config
()))
{
}
else
if
(
OB_FAIL
(
backup_service_
.
handle_backup_database
(
in_arg
)))
{
LOG_WARN
(
"failed to wait_refresh_schema"
,
K
(
ret
));
}
else
if
(
OB_FAIL
(
backup_service_
.
handle_backup_database
(
in_arg
)))
{
LOG_WARN
(
"failed to handle backup database"
,
K
(
ret
),
K
(
in_arg
));
LOG_WARN
(
"failed to handle backup database"
,
K
(
ret
),
K
(
in_arg
));
}
}
FLOG_INFO
(
"handle_backup_database"
,
K
(
ret
),
K
(
in_arg
));
FLOG_INFO
(
"handle_backup_database"
,
K
(
ret
),
K
(
in_arg
));
...
@@ -9625,9 +9587,7 @@ int ObRootService::handle_backup_delete(const obrpc::ObBackupCleanArg &arg)
...
@@ -9625,9 +9587,7 @@ int ObRootService::handle_backup_delete(const obrpc::ObBackupCleanArg &arg)
if
(
!
inited_
)
{
if
(
!
inited_
)
{
ret
=
OB_NOT_INIT
;
ret
=
OB_NOT_INIT
;
LOG_WARN
(
"not init"
,
K
(
ret
));
LOG_WARN
(
"not init"
,
K
(
ret
));
}
else
if
(
OB_FAIL
(
wait_refresh_config
()))
{
}
else
if
(
OB_FAIL
(
backup_service_
.
handle_backup_delete
(
arg
)))
{
LOG_WARN
(
"failed to wait_refresh_schema"
,
K
(
ret
));
}
else
if
(
OB_FAIL
(
backup_service_
.
handle_backup_delete
(
arg
)))
{
LOG_WARN
(
"failed to handle backup delete"
,
K
(
ret
),
K
(
arg
));
LOG_WARN
(
"failed to handle backup delete"
,
K
(
ret
),
K
(
arg
));
}
}
return
ret
;
return
ret
;
...
@@ -9729,8 +9689,6 @@ int ObRootService::handle_cancel_all_backup_force(const obrpc::ObBackupManageArg
...
@@ -9729,8 +9689,6 @@ int ObRootService::handle_cancel_all_backup_force(const obrpc::ObBackupManageArg
ROOTSERVICE_EVENT_ADD
(
"root_service"
,
"force_cancel_backup"
,
"result"
,
ret
,
K_
(
self_addr
));
ROOTSERVICE_EVENT_ADD
(
"root_service"
,
"force_cancel_backup"
,
"result"
,
ret
,
K_
(
self_addr
));
if
(
OB_FAIL
(
ret
))
{
if
(
OB_FAIL
(
ret
))
{
}
else
if
(
OB_FAIL
(
wait_refresh_config
()))
{
LOG_WARN
(
"failed to wait refresh schema"
,
K
(
ret
),
K
(
arg
));
}
else
if
(
OB_FAIL
(
backup_lease_service_
.
force_cancel
(
arg
.
tenant_id_
)))
{
}
else
if
(
OB_FAIL
(
backup_lease_service_
.
force_cancel
(
arg
.
tenant_id_
)))
{
LOG_WARN
(
"failed to force stop"
,
K
(
ret
),
K
(
arg
));
LOG_WARN
(
"failed to force stop"
,
K
(
ret
),
K
(
arg
));
}
}
...
...
src/rootserver/ob_root_service.h
浏览文件 @
db8fee3a
...
@@ -840,7 +840,6 @@ private:
...
@@ -840,7 +840,6 @@ private:
}
}
int
handle_cancel_backup_backup
(
const
obrpc
::
ObBackupManageArg
&
arg
);
int
handle_cancel_backup_backup
(
const
obrpc
::
ObBackupManageArg
&
arg
);
int
handle_cancel_all_backup_force
(
const
obrpc
::
ObBackupManageArg
&
arg
);
int
handle_cancel_all_backup_force
(
const
obrpc
::
ObBackupManageArg
&
arg
);
int
wait_refresh_config
();
int
clean_global_context
();
int
clean_global_context
();
private:
private:
bool
is_sys_tenant
(
const
common
::
ObString
&
tenant_name
);
bool
is_sys_tenant
(
const
common
::
ObString
&
tenant_name
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录