Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
caoersss
oceanbase
提交
d475941c
O
oceanbase
项目概览
caoersss
/
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,发现更多精彩内容 >>
提交
d475941c
编写于
3月 15, 2022
作者:
W
WenJinyu
提交者:
LINGuanRen
3月 15, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add event backup_dest and add backup clean log
上级
643214fe
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
54 addition
and
1 deletion
+54
-1
src/rootserver/ob_backup_data_clean.cpp
src/rootserver/ob_backup_data_clean.cpp
+11
-1
src/sql/resolver/cmd/ob_alter_system_resolver.cpp
src/sql/resolver/cmd/ob_alter_system_resolver.cpp
+43
-0
未找到文件。
src/rootserver/ob_backup_data_clean.cpp
浏览文件 @
d475941c
...
...
@@ -2325,7 +2325,7 @@ int ObBackupDataClean::get_need_delete_backup_set_ids(
}
}
if
(
OB_SUCC
(
ret
))
{
FLOG_
WARN
(
"
succ get need delete backup set ids"
,
K
(
backup_set_ids
));
FLOG_
INFO
(
"[BACKUP_CLEAN]
succ get need delete backup set ids"
,
K
(
backup_set_ids
));
}
}
return
ret
;
...
...
@@ -2466,6 +2466,8 @@ int ObBackupDataClean::get_sys_tenant_prepare_clog_round_and_piece(const share::
"backup_piece"
,
"tenant_id"
,
clean_info
.
tenant_id_
,
"round_id"
,
simple_piece_key
.
round_id_
,
"backup_piece_id"
,
simple_piece_key
.
backup_piece_id_
,
"copy_id"
,
...
...
@@ -5132,6 +5134,8 @@ int ObBackupDataClean::set_current_backup_dest()
LOG_WARN
(
"failed to set backup dest"
,
K
(
ret
),
K
(
backup_dest_buf
));
}
else
if
(
OB_FAIL
(
backup_dest_option_
.
init
(
false
/*is_backup_backup*/
)))
{
LOG_WARN
(
"failed to init backup dest option"
,
K
(
ret
));
}
else
{
LOG_INFO
(
"[BACKUP_CLEAN]succ set current backup dest"
,
K
(
backup_dest_buf
));
}
if
(
OB_FAIL
(
ret
))
{
...
...
@@ -5143,6 +5147,8 @@ int ObBackupDataClean::set_current_backup_dest()
LOG_WARN
(
"failed to set backup dest"
,
K
(
ret
),
K
(
backup_dest_buf
));
}
else
if
(
OB_FAIL
(
backup_backup_dest_option_
.
init
(
true
/*is_backup_backup*/
)))
{
LOG_WARN
(
"failed to init backup dest option"
,
K
(
ret
));
}
else
{
LOG_INFO
(
"[BACKUP_CLEAN]succ set current backup backup dest"
,
K
(
backup_backup_dest_buf
));
}
return
ret
;
...
...
@@ -6115,6 +6121,8 @@ int ObBackupDataClean::get_tenant_delete_piece(const share::ObBackupCleanInfo &c
"backup_piece"
,
"tenant_id"
,
clean_info
.
tenant_id_
,
"round_id"
,
simple_piece_key
.
round_id_
,
"backup_piece_id"
,
simple_piece_key
.
backup_piece_id_
,
"copy_id"
,
...
...
@@ -6303,6 +6311,8 @@ int ObBackupDataClean::prepare_delete_backup_piece_and_round(const ObBackupClean
"backup_piece"
,
"tenant_id"
,
sys_clean_info
.
tenant_id_
,
"round_id"
,
simple_piece_key
.
round_id_
,
"backup_piece_id"
,
simple_piece_key
.
backup_piece_id_
,
"copy_id"
,
...
...
src/sql/resolver/cmd/ob_alter_system_resolver.cpp
浏览文件 @
d475941c
...
...
@@ -36,6 +36,7 @@
#include "common/sql_mode/ob_sql_mode_utils.h"
#include "sql/resolver/cmd/ob_variable_set_stmt.h"
#include "observer/ob_server.h"
#include "rootserver/ob_rs_event_history_table_operator.h"
namespace
oceanbase
{
using
namespace
common
;
...
...
@@ -1547,6 +1548,23 @@ int check_backup_dest(const ObString& backup_dest)
}
}
if
(
OB_SUCC
(
ret
))
{
share
::
ObBackupDest
old_dest
;
if
(
OB_FAIL
(
GCONF
.
backup_dest
.
copy
(
backup_dest_buf
,
sizeof
(
backup_dest_buf
))))
{
LOG_WARN
(
"failed to set backup dest buf"
,
K
(
ret
));
}
else
if
(
0
==
strlen
(
backup_dest_buf
))
{
LOG_INFO
(
"[BACKUP_DEST]set new backup dest"
,
K
(
dest
));
ROOTSERVICE_EVENT_ADD
(
"backup_dest"
,
"backup_dest"
,
"old_backup_dest"
,
"null"
,
"new_backup_dest"
,
dest
.
root_path_
);
}
else
if
(
OB_FAIL
(
old_dest
.
set
(
backup_dest_buf
)))
{
LOG_WARN
(
"failed to set conf backup dest"
,
K
(
ret
),
K
(
backup_dest_buf
));
}
else
{
LOG_INFO
(
"[BACKUP_DEST]set new backup dest"
,
K
(
old_dest
),
K
(
dest
));
ROOTSERVICE_EVENT_ADD
(
"backup_dest"
,
"backup_dest"
,
"old_backup_dest"
,
old_dest
.
root_path_
,
"new_backup_dest"
,
dest
.
root_path_
);
}
}
return
ret
;
}
...
...
@@ -1727,6 +1745,31 @@ int check_backup_backup_dest(const ObString& backup_backup_dest)
ret
=
OB_INVALID_BACKUP_DEST
;
LOG_ERROR
(
"cannot use backup backup dest with non empty directory"
,
K
(
ret
));
}
if
(
OB_SUCC
(
ret
))
{
share
::
ObBackupDest
old_dest
;
if
(
OB_FAIL
(
GCONF
.
backup_backup_dest
.
copy
(
backup_backup_dest_buf
,
sizeof
(
backup_backup_dest_buf
))))
{
LOG_WARN
(
"failed to set backup backup dest buf"
,
K
(
ret
));
}
else
if
(
0
==
strlen
(
backup_backup_dest_buf
))
{
LOG_INFO
(
"[BACKUP_DEST]set new backup backup dest"
,
K
(
dst_dest
));
ROOTSERVICE_EVENT_ADD
(
"backup_dest"
,
"backup_backup_dest"
,
"old_backup_backup_dest"
,
"null"
,
"new_backup_backup_dest"
,
dst_dest
.
root_path_
);
}
else
if
(
OB_FAIL
(
old_dest
.
set
(
backup_backup_dest_buf
)))
{
LOG_WARN
(
"failed to set conf backup backup dest"
,
K
(
ret
),
K
(
backup_backup_dest_buf
));
}
else
{
LOG_INFO
(
"[BACKUP_DEST]set new backup backup dest"
,
K
(
old_dest
),
K
(
dst_dest
));
ROOTSERVICE_EVENT_ADD
(
"backup_dest"
,
"backup_backup_dest"
,
"old_backup_backup_dest"
,
old_dest
.
root_path_
,
"new_backup_backup_dest"
,
dst_dest
.
root_path_
);
}
}
return
ret
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录