Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Metz
oceanbase
提交
62f802f7
O
oceanbase
项目概览
Metz
/
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看板
提交
62f802f7
编写于
9月 09, 2021
作者:
Y
yy0
提交者:
wangzelin.wzl
9月 09, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix backup point missing problem
上级
47840e1b
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
27 addition
and
25 deletion
+27
-25
src/storage/ob_reserved_data_mgr.cpp
src/storage/ob_reserved_data_mgr.cpp
+23
-21
src/storage/ob_reserved_data_mgr.h
src/storage/ob_reserved_data_mgr.h
+4
-4
未找到文件。
src/storage/ob_reserved_data_mgr.cpp
浏览文件 @
62f802f7
...
@@ -1647,8 +1647,8 @@ int ObRecoveryDataMgr::init(const ObPartitionKey& pg_key)
...
@@ -1647,8 +1647,8 @@ int ObRecoveryDataMgr::init(const ObPartitionKey& pg_key)
}
}
int
ObRecoveryDataMgr
::
add_recovery_point_
(
const
ObRecoveryPointType
point_type
,
const
int64_t
snapshot_version
,
int
ObRecoveryDataMgr
::
add_recovery_point_
(
const
ObRecoveryPointType
point_type
,
const
int64_t
snapshot_version
,
const
ObPartitionGroupMeta
&
pg_meta
,
const
ObIArray
<
ObPGPartitionStoreMeta
>&
partition_store_metas
,
const
ObPartitionGroupMeta
&
pg_meta
,
const
ObIArray
<
ObPGPartitionStoreMeta
>
&
partition_store_metas
,
const
ObTablesHandle
&
tables_handle
,
ObRecoveryData
&
recovery_data
)
const
ObTablesHandle
&
tables_handle
)
{
{
int
ret
=
OB_SUCCESS
;
int
ret
=
OB_SUCCESS
;
ObRecoveryPointData
*
new_data
=
NULL
;
ObRecoveryPointData
*
new_data
=
NULL
;
...
@@ -1658,19 +1658,24 @@ int ObRecoveryDataMgr::add_recovery_point_(const ObRecoveryPointType point_type,
...
@@ -1658,19 +1658,24 @@ int ObRecoveryDataMgr::add_recovery_point_(const ObRecoveryPointType point_type,
}
else
if
(
OB_UNLIKELY
(
snapshot_version
<=
0
)
||
OB_UNLIKELY
(
!
pg_meta
.
is_valid
()))
{
}
else
if
(
OB_UNLIKELY
(
snapshot_version
<=
0
)
||
OB_UNLIKELY
(
!
pg_meta
.
is_valid
()))
{
ret
=
OB_INVALID_ARGUMENT
;
ret
=
OB_INVALID_ARGUMENT
;
LOG_WARN
(
"pg meta is not valid"
,
K
(
ret
),
K
(
snapshot_version
),
K
(
pg_meta
));
LOG_WARN
(
"pg meta is not valid"
,
K
(
ret
),
K
(
snapshot_version
),
K
(
pg_meta
));
}
else
if
(
OB_FAIL
(
recovery_data
.
create_recovery_point
(
snapshot_version
,
pg_meta
,
partition_store_metas
,
tables_handle
,
new_data
)))
{
LOG_WARN
(
"failed to alllocate recovery point data"
,
K
(
ret
));
}
else
if
(
OB_FAIL
(
write_add_data_slog_
(
point_type
,
*
new_data
)))
{
LOG_WARN
(
"failed to write add recovery point data slog"
,
K
(
ret
));
}
else
if
(
OB_FAIL
(
recovery_data
.
insert_recovery_point
(
new_data
)))
{
LOG_WARN
(
"failed to add recovery point data"
,
K
(
ret
));
ob_abort
();
}
else
{
}
else
{
LOG_INFO
(
"succeed to add a new recovery point data"
,
KPC
(
new_data
));
// There must be only restore point and backup point
}
ObRecoveryData
&
recovery_data
=
if
(
OB_FAIL
(
ret
)
&&
NULL
!=
new_data
)
{
(
point_type
==
ObRecoveryPointType
::
RESTORE_POINT
?
restore_point_data_
:
backup_point_data_
);
recovery_data
.
free_recovery_point
(
new_data
);
if
(
OB_FAIL
(
recovery_data
.
create_recovery_point
(
snapshot_version
,
pg_meta
,
partition_store_metas
,
tables_handle
,
new_data
)))
{
LOG_WARN
(
"failed to alllocate recovery point data"
,
K
(
ret
));
}
else
if
(
OB_FAIL
(
write_add_data_slog_
(
point_type
,
*
new_data
)))
{
LOG_WARN
(
"failed to write add recovery point data slog"
,
K
(
ret
));
}
else
if
(
OB_FAIL
(
recovery_data
.
insert_recovery_point
(
new_data
)))
{
LOG_WARN
(
"failed to add recovery point data"
,
K
(
ret
));
ob_abort
();
}
else
{
LOG_INFO
(
"succeed to add a new recovery point data"
,
KPC
(
new_data
));
}
if
(
OB_FAIL
(
ret
)
&&
NULL
!=
new_data
)
{
recovery_data
.
free_recovery_point
(
new_data
);
}
}
}
return
ret
;
return
ret
;
}
}
...
@@ -1914,9 +1919,8 @@ int ObRecoveryDataMgr::add_restore_point(const int64_t snapshot_version, const O
...
@@ -1914,9 +1919,8 @@ int ObRecoveryDataMgr::add_restore_point(const int64_t snapshot_version, const O
snapshot_version
,
snapshot_version
,
pg_meta
,
pg_meta
,
partition_store_metas
,
partition_store_metas
,
tables_handle
,
tables_handle
)))
{
restore_point_data_
)))
{
LOG_WARN
(
"faild to add restore point"
,
K
(
ret
),
K
(
pg_meta
));
LOG_WARN
(
"failed to add restore point"
,
K
(
ret
),
K
(
pg_meta
));
}
}
return
ret
;
return
ret
;
}
}
...
@@ -2112,8 +2116,7 @@ int ObRecoveryDataMgr::add_backup_point(const int64_t snapshot_version, const Ob
...
@@ -2112,8 +2116,7 @@ int ObRecoveryDataMgr::add_backup_point(const int64_t snapshot_version, const Ob
snapshot_version
,
snapshot_version
,
pg_meta
,
pg_meta
,
partition_store_metas
,
partition_store_metas
,
tables_handle
,
tables_handle
)))
{
backup_point_data_
)))
{
LOG_WARN
(
"failed to add backup point"
,
K
(
ret
),
K
(
pg_meta
));
LOG_WARN
(
"failed to add backup point"
,
K
(
ret
),
K
(
pg_meta
));
}
}
return
ret
;
return
ret
;
...
@@ -2452,8 +2455,7 @@ int ObRecoveryDataMgr::add_recovery_point(const ObRecoveryPointKey& recovery_poi
...
@@ -2452,8 +2455,7 @@ int ObRecoveryDataMgr::add_recovery_point(const ObRecoveryPointKey& recovery_poi
recovery_point_key
.
snapshot_version_
,
recovery_point_key
.
snapshot_version_
,
recovery_point_meta_info
.
pg_meta_
,
recovery_point_meta_info
.
pg_meta_
,
recovery_point_meta_info
.
partition_store_metas_
,
recovery_point_meta_info
.
partition_store_metas_
,
tables_handle
,
tables_handle
)))
{
restore_point_data_
)))
{
LOG_WARN
(
"faild to add restore point"
,
K
(
ret
),
K
(
recovery_point_meta_info
));
LOG_WARN
(
"faild to add restore point"
,
K
(
ret
),
K
(
recovery_point_meta_info
));
}
}
return
ret
;
return
ret
;
...
...
src/storage/ob_reserved_data_mgr.h
浏览文件 @
62f802f7
...
@@ -280,10 +280,10 @@ public:
...
@@ -280,10 +280,10 @@ public:
private:
private:
int
add_recovery_point_
(
const
ObRecoveryPointType
point_type
,
const
int64_t
snapshot_version
,
int
add_recovery_point_
(
const
ObRecoveryPointType
point_type
,
const
int64_t
snapshot_version
,
const
ObPartitionGroupMeta
&
pg_meta
,
const
ObIArray
<
ObPGPartitionStoreMeta
>&
partition_store_metas
,
const
ObPartitionGroupMeta
&
pg_meta
,
const
ObIArray
<
ObPGPartitionStoreMeta
>
&
partition_store_metas
,
const
ObTablesHandle
&
tables_handle
,
ObRecoveryData
&
recovery_data
);
const
ObTablesHandle
&
tables_handle
);
int
write_add_data_slog_
(
const
ObRecoveryPointType
point_type
,
ObRecoveryPointData
&
point_data
);
int
write_add_data_slog_
(
const
ObRecoveryPointType
point_type
,
ObRecoveryPointData
&
point_data
);
int
write_remove_data_slogs_
(
const
ObRecoveryPointType
point_type
,
ObIArray
<
ObRecoveryPointData
*>&
points_data
);
int
write_remove_data_slogs_
(
const
ObRecoveryPointType
point_type
,
ObIArray
<
ObRecoveryPointData
*>
&
points_data
);
// for restore point
// for restore point
int
replay_add_restore_point_
(
const
ObRecoveryPointData
&
point_data
);
int
replay_add_restore_point_
(
const
ObRecoveryPointData
&
point_data
);
int
replay_remove_restore_point_
(
const
int64_t
snapshot_version
);
int
replay_remove_restore_point_
(
const
int64_t
snapshot_version
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录