Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
野花太放肆
oceanbase
提交
a336d376
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,发现更多精彩内容 >>
提交
a336d376
编写于
3月 23, 2023
作者:
O
obdev
提交者:
ob-robot
3月 23, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix some restore bug and add print info
上级
63a9bb62
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
26 addition
and
19 deletion
+26
-19
src/logservice/restoreservice/ob_log_archive_piece_mgr.cpp
src/logservice/restoreservice/ob_log_archive_piece_mgr.cpp
+7
-1
src/logservice/restoreservice/ob_remote_fetch_log_worker.cpp
src/logservice/restoreservice/ob_remote_fetch_log_worker.cpp
+17
-15
src/logservice/restoreservice/ob_remote_fetch_log_worker.h
src/logservice/restoreservice/ob_remote_fetch_log_worker.h
+1
-2
src/share/backup/ob_backup_lease_info_mgr.h
src/share/backup/ob_backup_lease_info_mgr.h
+1
-1
未找到文件。
src/logservice/restoreservice/ob_log_archive_piece_mgr.cpp
浏览文件 @
a336d376
...
...
@@ -1269,7 +1269,13 @@ int ObLogArchivePieceContext::get_max_log_in_piece_(const ObLogArchivePieceConte
if
(
OB_FAIL
(
get_piece_meta_info_
(
piece_id
)))
{
ARCHIVE_LOG
(
WARN
,
"get piece meta info failed"
,
K
(
ret
),
K_
(
id
),
K_
(
round_context
),
K
(
piece_id
));
}
else
if
(
OB_FAIL
(
get_piece_file_range_
()))
{
ARCHIVE_LOG
(
WARN
,
"get piece file range failed"
,
K
(
ret
));
if
(
OB_ITER_END
==
ret
)
{
ret
=
OB_SUCCESS
;
exist
=
false
;
// no file exist in this piece, return OB_SUCCESS
}
else
{
ARCHIVE_LOG
(
WARN
,
"get piece file range failed"
,
K
(
ret
));
}
}
else
if
(
inner_piece_context_
.
is_empty_
()
||
inner_piece_context_
.
max_file_id_
==
0
)
{
ARCHIVE_LOG
(
INFO
,
"no file exist in piece, just skip"
,
K
(
ret
),
K_
(
id
),
K_
(
round_context
),
K_
(
inner_piece_context
));
}
else
{
...
...
src/logservice/restoreservice/ob_remote_fetch_log_worker.cpp
浏览文件 @
a336d376
...
...
@@ -330,39 +330,42 @@ int ObRemoteFetchWorker::handle_fetch_log_task_(ObFetchLogTask *task)
return
ret
;
}
int
ObRemoteFetchWorker
::
submit_entries_
(
const
ObLSID
&
id
,
const
int64_t
proposal_id
,
const
palf
::
LSN
&
base_lsn
,
ObRemoteLogGroupEntryIterator
&
iter
)
int
ObRemoteFetchWorker
::
submit_entries_
(
ObFetchLogTask
&
task
)
{
int
ret
=
OB_SUCCESS
;
LogGroupEntry
entry
;
const
char
*
buf
=
NULL
;
int64_t
size
=
0
;
LSN
lsn
;
const
ObLSID
&
id
=
task
.
id_
;
while
(
OB_SUCC
(
ret
)
&&
!
has_set_stop
())
{
bool
quota_done
=
false
;
if
(
OB_FAIL
(
iter
.
next
(
entry
,
lsn
,
buf
,
size
)))
{
if
(
OB_FAIL
(
task
.
iter_
.
next
(
entry
,
lsn
,
buf
,
size
)))
{
if
(
OB_ITER_END
!=
ret
)
{
LOG_WARN
(
"ObRemoteLogIterator next failed"
,
K
(
ret
),
K
(
iter
));
LOG_WARN
(
"ObRemoteLogIterator next failed"
,
K
(
task
));
}
else
{
LOG_TRACE
(
"ObRemoteLogIterator to end"
,
K
(
iter
));
LOG_TRACE
(
"ObRemoteLogIterator to end"
,
K
(
task
.
iter_
));
}
}
else
if
(
OB_UNLIKELY
(
!
entry
.
check_integrity
()))
{
ret
=
OB_INVALID_DATA
;
LOG_WARN
(
"entry is invalid"
,
K
(
ret
),
K
(
entry
),
K
(
lsn
),
K
(
iter
));
}
else
if
(
base_lsn
>
lsn
)
{
LOG_INFO
(
"repeated log, just skip"
,
K
(
ret
),
K
(
id
),
K
(
lsn
),
K
(
base_lsn
),
K
(
entry
));
LOG_WARN
(
"entry is invalid"
,
K
(
entry
),
K
(
lsn
),
K
(
task
));
}
else
if
(
task
.
cur_lsn_
>
lsn
)
{
LOG_INFO
(
"repeated log, just skip"
,
K
(
lsn
),
K
(
entry
),
K
(
task
));
}
else
if
(
OB_FAIL
(
wait_restore_quota_
(
entry
.
get_serialize_size
(),
quota_done
)))
{
LOG_WARN
(
"wait restore quota failed"
,
K
(
ret
),
K
(
entry
));
LOG_WARN
(
"wait restore quota failed"
,
K
(
entry
),
K
(
task
));
}
else
if
(
!
quota_done
)
{
break
;
}
else
if
(
OB_FAIL
(
submit_log_
(
id
,
proposal_id
,
lsn
,
}
else
if
(
OB_FAIL
(
submit_log_
(
id
,
task
.
proposal_id_
,
lsn
,
entry
.
get_scn
(),
buf
,
entry
.
get_serialize_size
())))
{
LOG_WARN
(
"submit log failed"
,
K
(
ret
),
K
(
iter
),
K
(
buf
),
K
(
entry
),
K
(
lsn
));
LOG_WARN
(
"submit log failed"
,
K
(
buf
),
K
(
entry
),
K
(
lsn
),
K
(
task
));
}
else
{
task
.
cur_lsn_
=
lsn
+
entry
.
get_serialize_size
();
}
}
// while
if
(
OB_ITER_END
==
ret
)
{
if
(
lsn
.
is_valid
())
{
LOG_INFO
(
"submit_entries_ succ"
,
K
(
id
),
K
(
lsn
),
K
(
entry
.
get_scn
()),
K
(
task
));
}
ret
=
OB_SUCCESS
;
}
return
ret
;
...
...
@@ -520,8 +523,7 @@ int ObRemoteFetchWorker::foreach_ls_(const ObLSID &id)
}
}
else
if
(
NULL
==
task
)
{
break
;
}
else
if
(
OB_FAIL
(
submit_entries_
(
task
->
id_
,
task
->
proposal_id_
,
task
->
cur_lsn_
,
task
->
iter_
)))
{
}
else
if
(
OB_FAIL
(
submit_entries_
(
*
task
)))
{
if
(
OB_RESTORE_LOG_TO_END
!=
ret
)
{
LOG_WARN
(
"submit_entries_ failed"
,
K
(
ret
),
KPC
(
task
));
}
...
...
src/logservice/restoreservice/ob_remote_fetch_log_worker.h
浏览文件 @
a336d376
...
...
@@ -78,8 +78,7 @@ private:
void
do_thread_task_
();
int
handle_single_task_
();
int
handle_fetch_log_task_
(
ObFetchLogTask
*
task
);
int
submit_entries_
(
const
ObLSID
&
id
,
const
int64_t
proposal_id
,
const
palf
::
LSN
&
base_lsn
,
ObRemoteLogGroupEntryIterator
&
iter
);
int
submit_entries_
(
ObFetchLogTask
&
task
);
int
submit_log_
(
const
ObLSID
&
id
,
const
int64_t
proposal_id
,
const
LSN
&
lsn
,
const
share
::
SCN
&
scn
,
const
char
*
buf
,
const
int64_t
buf_size
);
int
wait_restore_quota_
(
const
int64_t
size
,
bool
&
done
);
...
...
src/share/backup/ob_backup_lease_info_mgr.h
浏览文件 @
a336d376
...
...
@@ -35,7 +35,7 @@ struct ObBackupLeaseInfo
static
const
int64_t
MAX_LEASE_TIME
=
30
*
1000
*
1000
;
static
const
int64_t
MAX_LEASE_TAKEOVER_TIME
=
10
*
60
*
1000
*
1000L
;
static
const
int64_t
MAX_LEASE_TAKEOVER_TIME
=
10
*
1000
*
1000L
;
ObBackupLeaseInfo
();
void
reset
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录