Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Metz
oceanbase
提交
f4df995a
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
f4df995a
编写于
6月 25, 2022
作者:
G
godyangfight
提交者:
wangzelin.wzl
6月 25, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[CP] backup task cannot finish when backup disk is full
上级
e44cddde
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
40 addition
and
5 deletion
+40
-5
deps/oblib/src/lib/utility/ob_tracepoint.h
deps/oblib/src/lib/utility/ob_tracepoint.h
+1
-0
src/share/backup/ob_backup_meta_store.cpp
src/share/backup/ob_backup_meta_store.cpp
+14
-2
src/share/backup/ob_backup_meta_store.h
src/share/backup/ob_backup_meta_store.h
+1
-0
src/storage/ob_partition_base_data_backup.cpp
src/storage/ob_partition_base_data_backup.cpp
+18
-1
src/storage/ob_partition_base_data_physical_restore.cpp
src/storage/ob_partition_base_data_physical_restore.cpp
+6
-2
未找到文件。
deps/oblib/src/lib/utility/ob_tracepoint.h
浏览文件 @
f4df995a
...
@@ -448,6 +448,7 @@ public:
...
@@ -448,6 +448,7 @@ public:
EN_STOP_TENANT_LOG_ARCHIVE_BACKUP
=
186
,
EN_STOP_TENANT_LOG_ARCHIVE_BACKUP
=
186
,
EN_BACKUP_SERVER_DISK_IS_FULL
=
188
,
EN_BACKUP_SERVER_DISK_IS_FULL
=
188
,
EN_BACKUP_DATA_CLEAN_ERROR
=
189
,
EN_BACKUP_DATA_CLEAN_ERROR
=
189
,
EN_BACKUP_COMMON_HEADER_NOT_COMPLETED
=
190
,
EN_BACKUP_SCHEDULER_WEAK_READ
=
191
,
EN_BACKUP_SCHEDULER_WEAK_READ
=
191
,
EN_CHECK_STANDBY_CLUSTER_SCHEMA_CONDITION
=
201
,
EN_CHECK_STANDBY_CLUSTER_SCHEMA_CONDITION
=
201
,
EN_ALLOCATE_LOB_BUF_FAILED
=
202
,
EN_ALLOCATE_LOB_BUF_FAILED
=
202
,
...
...
src/share/backup/ob_backup_meta_store.cpp
浏览文件 @
f4df995a
...
@@ -81,7 +81,13 @@ int64_t ObBackupMeta::get_total_macro_block_count() const
...
@@ -81,7 +81,13 @@ int64_t ObBackupMeta::get_total_macro_block_count() const
}
}
ObBackupMetaFileStore
::
ObBackupMetaFileStore
()
ObBackupMetaFileStore
::
ObBackupMetaFileStore
()
:
is_inited_
(
false
),
pos_
(
-
1
),
cur_mem_file_
(),
allocator_
(),
base_path_info_
(),
meta_file_path_list_
()
:
is_inited_
(
false
),
pos_
(
-
1
),
cur_mem_file_
(),
allocator_
(),
base_path_info_
(),
meta_file_path_list_
(),
need_swith_next_file_
(
false
)
{}
{}
ObBackupMetaFileStore
::~
ObBackupMetaFileStore
()
ObBackupMetaFileStore
::~
ObBackupMetaFileStore
()
...
@@ -122,6 +128,8 @@ int ObBackupMetaFileStore::next(ObBackupMeta& backup_meta)
...
@@ -122,6 +128,8 @@ int ObBackupMetaFileStore::next(ObBackupMeta& backup_meta)
LOG_WARN
(
"memory file should not be null"
,
KR
(
ret
),
K
(
mem_file
));
LOG_WARN
(
"memory file should not be null"
,
KR
(
ret
),
K
(
mem_file
));
}
else
if
(
OB_FAIL
(
may_need_parse_common_header
(
mem_file
)))
{
}
else
if
(
OB_FAIL
(
may_need_parse_common_header
(
mem_file
)))
{
LOG_WARN
(
"failed to parse common header"
,
KR
(
ret
));
LOG_WARN
(
"failed to parse common header"
,
KR
(
ret
));
}
else
if
(
need_swith_next_file_
)
{
FLOG_INFO
(
"backup data has incomplete data, skip it"
,
KPC
(
mem_file
));
}
else
if
(
OB_FAIL
(
parse_sealed_message
(
mem_file
,
backup_meta
,
end_of_one_block
)))
{
}
else
if
(
OB_FAIL
(
parse_sealed_message
(
mem_file
,
backup_meta
,
end_of_one_block
)))
{
LOG_WARN
(
"failed to parse sealed message"
,
KR
(
ret
));
LOG_WARN
(
"failed to parse sealed message"
,
KR
(
ret
));
}
else
if
(
mem_file
->
reader_
.
pos
()
==
mem_file
->
end_pos_
)
{
}
else
if
(
mem_file
->
reader_
.
pos
()
==
mem_file
->
end_pos_
)
{
...
@@ -227,7 +235,7 @@ int ObBackupMetaFileStore::get_next_mem_file(MemoryFile*& mem_file)
...
@@ -227,7 +235,7 @@ int ObBackupMetaFileStore::get_next_mem_file(MemoryFile*& mem_file)
if
(
IS_NOT_INIT
)
{
if
(
IS_NOT_INIT
)
{
ret
=
OB_NOT_INIT
;
ret
=
OB_NOT_INIT
;
LOG_WARN
(
"backup meta file store not init"
,
KR
(
ret
));
LOG_WARN
(
"backup meta file store not init"
,
KR
(
ret
));
}
else
if
(
cur_mem_file_
.
reader_
.
remain
()
>
0
&&
!
cur_mem_file_
.
meet_file_end_mark_
)
{
}
else
if
(
cur_mem_file_
.
reader_
.
remain
()
>
0
&&
!
cur_mem_file_
.
meet_file_end_mark_
&&
!
need_swith_next_file_
)
{
mem_file
=
&
cur_mem_file_
;
mem_file
=
&
cur_mem_file_
;
}
else
{
}
else
{
LOG_INFO
(
"current memory file"
,
K
(
cur_mem_file_
.
reader_
));
LOG_INFO
(
"current memory file"
,
K
(
cur_mem_file_
.
reader_
));
...
@@ -246,6 +254,7 @@ int ObBackupMetaFileStore::get_next_mem_file(MemoryFile*& mem_file)
...
@@ -246,6 +254,7 @@ int ObBackupMetaFileStore::get_next_mem_file(MemoryFile*& mem_file)
LOG_WARN
(
"failed to assign mem file"
,
KR
(
ret
),
K
(
tmp_mem_file
));
LOG_WARN
(
"failed to assign mem file"
,
KR
(
ret
),
K
(
tmp_mem_file
));
}
else
{
}
else
{
mem_file
=
&
cur_mem_file_
;
mem_file
=
&
cur_mem_file_
;
need_swith_next_file_
=
false
;
}
}
}
}
}
}
...
@@ -262,6 +271,9 @@ int ObBackupMetaFileStore::may_need_parse_common_header(MemoryFile*& mem_file)
...
@@ -262,6 +271,9 @@ int ObBackupMetaFileStore::may_need_parse_common_header(MemoryFile*& mem_file)
LOG_WARN
(
"backup meta file store do not init"
,
KR
(
ret
));
LOG_WARN
(
"backup meta file store do not init"
,
KR
(
ret
));
}
else
if
(
!
mem_file
->
need_parse_common_header_
)
{
}
else
if
(
!
mem_file
->
need_parse_common_header_
)
{
// do not need parse common header
// do not need parse common header
}
else
if
(
reader
.
remain
()
<
sizeof
(
ObBackupCommonHeader
))
{
FLOG_INFO
(
"backup data has incomplete data, skip it"
,
KPC
(
mem_file
));
need_swith_next_file_
=
true
;
}
else
if
(
OB_FAIL
(
parse_common_header
(
reader
,
common_header
)))
{
}
else
if
(
OB_FAIL
(
parse_common_header
(
reader
,
common_header
)))
{
LOG_WARN
(
"failed to parse common header"
,
KR
(
ret
));
LOG_WARN
(
"failed to parse common header"
,
KR
(
ret
));
}
else
if
(
OB_FAIL
(
common_header
.
check_valid
()))
{
}
else
if
(
OB_FAIL
(
common_header
.
check_valid
()))
{
...
...
src/share/backup/ob_backup_meta_store.h
浏览文件 @
f4df995a
...
@@ -118,6 +118,7 @@ private:
...
@@ -118,6 +118,7 @@ private:
common
::
ObArenaAllocator
allocator_
;
common
::
ObArenaAllocator
allocator_
;
share
::
ObBackupBaseDataPathInfo
base_path_info_
;
share
::
ObBackupBaseDataPathInfo
base_path_info_
;
common
::
ObArray
<
share
::
ObBackupPath
>
meta_file_path_list_
;
common
::
ObArray
<
share
::
ObBackupPath
>
meta_file_path_list_
;
bool
need_swith_next_file_
;
private:
private:
DISALLOW_COPY_AND_ASSIGN
(
ObBackupMetaFileStore
);
DISALLOW_COPY_AND_ASSIGN
(
ObBackupMetaFileStore
);
...
...
src/storage/ob_partition_base_data_backup.cpp
浏览文件 @
f4df995a
...
@@ -1973,6 +1973,23 @@ int ObBackupFileAppender::sync_upload()
...
@@ -1973,6 +1973,23 @@ int ObBackupFileAppender::sync_upload()
STORAGE_LOG
(
WARN
,
"advance align size fail"
,
K
(
ret
),
K
(
align_size
),
K
(
advance_size
));
STORAGE_LOG
(
WARN
,
"advance align size fail"
,
K
(
ret
),
K
(
align_size
),
K
(
advance_size
));
}
}
#ifdef ERRSIM
if
(
OB_SUCC
(
ret
)
&&
ObBackupFileType
::
BACKUP_META_INDEX
==
file_type_
)
{
ret
=
E
(
EventTable
::
EN_BACKUP_COMMON_HEADER_NOT_COMPLETED
)
OB_SUCCESS
;
if
(
OB_FAIL
(
ret
))
{
LOG_WARN
(
"prepare uplaod incomplete header"
,
K
(
ret
),
KPC
(
common_header_
));
const
int64_t
head_length
=
sizeof
(
ObBackupCommonHeader
);
if
(
0
==
head_length
/
2
||
data_buffer_
.
length
()
<
head_length
)
{
ret
=
OB_SUCCESS
;
}
else
if
(
OB_FAIL
(
storage_appender_
.
pwrite
(
data_buffer_
.
data
(),
head_length
/
2
,
file_offset_
)))
{
STORAGE_LOG
(
WARN
,
"storage_writer writer fail"
,
K
(
ret
),
K
(
storage_appender_
));
}
else
{
ret
=
OB_IO_ERROR
;
}
}
}
#endif
#ifdef ERRSIM
#ifdef ERRSIM
if
(
OB_SUCC
(
ret
)
&&
ObBackupFileType
::
BACKUP_META_INDEX
==
file_type_
)
{
if
(
OB_SUCC
(
ret
)
&&
ObBackupFileType
::
BACKUP_META_INDEX
==
file_type_
)
{
ret
=
E
(
EventTable
::
EN_BACKUP_META_INDEX_BUFFER_NOT_COMPLETED
)
OB_SUCCESS
;
ret
=
E
(
EventTable
::
EN_BACKUP_META_INDEX_BUFFER_NOT_COMPLETED
)
OB_SUCCESS
;
...
@@ -2956,7 +2973,7 @@ int ObBackupPhysicalPGCtx::fetch_retry_points(const ObString& path, const ObStri
...
@@ -2956,7 +2973,7 @@ int ObBackupPhysicalPGCtx::fetch_retry_points(const ObString& path, const ObStri
common_header
=
NULL
;
common_header
=
NULL
;
int64_t
end_pos
=
0
;
int64_t
end_pos
=
0
;
if
(
buffer_reader
.
remain
()
<
sizeof
(
ObBackupCommonHeader
))
{
if
(
buffer_reader
.
remain
()
<
sizeof
(
ObBackupCommonHeader
))
{
STORAGE_LOG
(
INFO
,
"backup data has incomplete data, skip it"
,
K
(
buffer_reader
.
remain
()
));
FLOG_INFO
(
"backup data has incomplete data, skip it"
,
K
(
buffer_reader
.
remain
()),
K
(
path
),
K
(
storage_info
));
break
;
break
;
}
else
if
(
OB_FAIL
(
buffer_reader
.
get
(
common_header
)))
{
}
else
if
(
OB_FAIL
(
buffer_reader
.
get
(
common_header
)))
{
STORAGE_LOG
(
WARN
,
"read macro index common header fail"
,
K
(
ret
));
STORAGE_LOG
(
WARN
,
"read macro index common header fail"
,
K
(
ret
));
...
...
src/storage/ob_partition_base_data_physical_restore.cpp
浏览文件 @
f4df995a
...
@@ -753,7 +753,11 @@ int ObPhyRestoreMetaIndexStore::init_one_file(
...
@@ -753,7 +753,11 @@ int ObPhyRestoreMetaIndexStore::init_one_file(
ObBackupMetaIndex
meta_index
;
ObBackupMetaIndex
meta_index
;
while
(
OB_SUCC
(
ret
)
&&
buffer_reader
.
remain
()
>
0
)
{
while
(
OB_SUCC
(
ret
)
&&
buffer_reader
.
remain
()
>
0
)
{
common_header
=
NULL
;
common_header
=
NULL
;
if
(
OB_FAIL
(
buffer_reader
.
get
(
common_header
)))
{
if
(
buffer_reader
.
remain
()
<
sizeof
(
ObBackupCommonHeader
))
{
FLOG_INFO
(
"backup data has incomplete data, skip it"
,
K
(
buffer_reader
.
remain
()),
K
(
path
),
K
(
storage_info
));
break
;
}
else
if
(
OB_FAIL
(
buffer_reader
.
get
(
common_header
)))
{
STORAGE_LOG
(
WARN
,
"read meta index common header fail"
,
K
(
ret
));
STORAGE_LOG
(
WARN
,
"read meta index common header fail"
,
K
(
ret
));
}
else
if
(
OB_ISNULL
(
common_header
))
{
}
else
if
(
OB_ISNULL
(
common_header
))
{
ret
=
OB_ERR_UNEXPECTED
;
ret
=
OB_ERR_UNEXPECTED
;
...
@@ -1115,7 +1119,7 @@ int ObPhyRestoreMacroIndexStore::init_one_file(
...
@@ -1115,7 +1119,7 @@ int ObPhyRestoreMacroIndexStore::init_one_file(
while
(
OB_SUCC
(
ret
)
&&
buffer_reader
.
remain
()
>
0
)
{
while
(
OB_SUCC
(
ret
)
&&
buffer_reader
.
remain
()
>
0
)
{
common_header
=
NULL
;
common_header
=
NULL
;
if
(
buffer_reader
.
remain
()
<
sizeof
(
ObBackupCommonHeader
))
{
if
(
buffer_reader
.
remain
()
<
sizeof
(
ObBackupCommonHeader
))
{
STORAGE_LOG
(
INFO
,
"backup data has incomplete data, skip it"
,
K
(
buffer_reader
.
remain
()
));
FLOG_INFO
(
"backup data has incomplete data, skip it"
,
K
(
buffer_reader
.
remain
()),
K
(
path
),
K
(
storage_info
));
break
;
break
;
}
else
if
(
OB_FAIL
(
buffer_reader
.
get
(
common_header
)))
{
}
else
if
(
OB_FAIL
(
buffer_reader
.
get
(
common_header
)))
{
STORAGE_LOG
(
WARN
,
"read macro index common header fail"
,
K
(
ret
));
STORAGE_LOG
(
WARN
,
"read macro index common header fail"
,
K
(
ret
));
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录