Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
野花太放肆
oceanbase
提交
1bb857cd
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 搜索 >>
提交
1bb857cd
编写于
3月 28, 2023
作者:
O
obdev
提交者:
ob-robot
3月 28, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Move ls_id reference usage in archive and restore
上级
399b29e4
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
15 addition
and
16 deletion
+15
-16
src/logservice/archiveservice/ob_archive_fetcher.cpp
src/logservice/archiveservice/ob_archive_fetcher.cpp
+5
-5
src/logservice/archiveservice/ob_archive_sender.cpp
src/logservice/archiveservice/ob_archive_sender.cpp
+4
-4
src/logservice/archiveservice/ob_archive_task.h
src/logservice/archiveservice/ob_archive_task.h
+2
-3
src/logservice/archiveservice/ob_ls_mgr.cpp
src/logservice/archiveservice/ob_ls_mgr.cpp
+1
-1
src/logservice/archiveservice/ob_ls_task.cpp
src/logservice/archiveservice/ob_ls_task.cpp
+1
-1
src/logservice/restoreservice/ob_remote_fetch_log_worker.cpp
src/logservice/restoreservice/ob_remote_fetch_log_worker.cpp
+2
-2
未找到文件。
src/logservice/archiveservice/ob_archive_fetcher.cpp
浏览文件 @
1bb857cd
...
...
@@ -322,7 +322,7 @@ int ObArchiveFetcher::handle_single_task_()
ARCHIVE_LOG
(
ERROR
,
"data is NULL"
,
K
(
ret
),
K
(
data
));
}
else
{
ObArchiveLogFetchTask
*
task
=
static_cast
<
ObArchiveLogFetchTask
*>
(
data
);
ObLSID
id
=
task
->
get_ls_id
_copy
();
ObLSID
id
=
task
->
get_ls_id
();
ArchiveKey
key
=
task
->
get_station
().
get_round
();
// task will be submit to fetch_log_queue or re-submit to handle or free due to fatal error
...
...
@@ -511,7 +511,7 @@ int ObArchiveFetcher::init_helper_(ObArchiveLogFetchTask &task, const LSN &commi
{
int
ret
=
OB_SUCCESS
;
LSN
start_offset
;
const
ObLSID
&
id
=
task
.
get_ls_id
();
const
ObLSID
id
=
task
.
get_ls_id
();
const
LSN
&
end_offset
=
task
.
get_end_offset
();
const
ObArchivePiece
&
cur_piece
=
task
.
get_piece
();
const
ObArchivePiece
&
next_piece
=
task
.
get_next_piece
();
...
...
@@ -771,7 +771,7 @@ int ObArchiveFetcher::update_log_fetch_task_(ObArchiveLogFetchTask &fetch_task,
int
ObArchiveFetcher
::
submit_fetch_log_
(
ObArchiveLogFetchTask
&
task
,
bool
&
submitted
)
{
int
ret
=
OB_SUCCESS
;
const
ObLSID
&
id
=
task
.
get_ls_id
();
const
ObLSID
id
=
task
.
get_ls_id
();
submitted
=
false
;
if
(
!
task
.
has_fetch_log
())
{
...
...
@@ -779,10 +779,10 @@ int ObArchiveFetcher::submit_fetch_log_(ObArchiveLogFetchTask &task, bool &submi
}
else
{
GET_LS_TASK_CTX
(
ls_mgr_
,
id
)
{
if
(
OB_FAIL
(
ls_archive_task
->
push_fetch_log
(
task
)))
{
ARCHIVE_LOG
(
WARN
,
"push fetch log failed"
,
K
(
ret
),
K
(
task
));
ARCHIVE_LOG
(
WARN
,
"push fetch log failed"
,
K
(
ret
),
K
(
id
),
K
(
task
));
}
else
{
submitted
=
true
;
ARCHIVE_LOG
(
INFO
,
"push fetch log succ"
,
KP
(
&
task
));
ARCHIVE_LOG
(
INFO
,
"push fetch log succ"
,
K
(
id
),
K
P
(
&
task
));
}
}
}
...
...
src/logservice/archiveservice/ob_archive_sender.cpp
浏览文件 @
1bb857cd
...
...
@@ -217,14 +217,14 @@ int ObArchiveSender::modify_thread_count(const int64_t thread_count)
int
ObArchiveSender
::
submit_send_task_
(
ObArchiveSendTask
*
task
)
{
int
ret
=
OB_SUCCESS
;
const
ObLSID
&
id
=
task
->
get_ls_id
();
const
ObLSID
id
=
task
->
get_ls_id
();
if
(
OB_ISNULL
(
ls_mgr_
))
{
ret
=
OB_ERR_UNEXPECTED
;
ARCHIVE_LOG
(
ERROR
,
"ls_mgr_ is NULL"
,
K
(
ret
),
K
(
ls_mgr_
));
}
else
{
GET_LS_TASK_CTX
(
ls_mgr_
,
id
)
{
if
(
OB_FAIL
(
ls_archive_task
->
push_send_task
(
*
task
,
*
this
)))
{
ARCHIVE_LOG
(
WARN
,
"push_send_task fail"
,
K
(
ret
),
KPC
(
task
));
ARCHIVE_LOG
(
WARN
,
"push_send_task fail"
,
K
(
ret
),
K
(
id
),
K
PC
(
task
));
}
}
}
...
...
@@ -428,7 +428,7 @@ bool ObArchiveSender::in_normal_status_(const ArchiveKey &key) const
void
ObArchiveSender
::
handle
(
ObArchiveSendTask
&
task
,
TaskConsumeStatus
&
consume_status
)
{
int
ret
=
OB_SUCCESS
;
const
ObLSID
&
id
=
task
.
get_ls_id
();
const
ObLSID
id
=
task
.
get_ls_id
();
const
ArchiveWorkStation
&
station
=
task
.
get_station
();
share
::
ObBackupDest
backup_dest
;
if
(
OB_UNLIKELY
(
!
task
.
is_valid
()))
{
...
...
@@ -507,7 +507,7 @@ int ObArchiveSender::check_piece_continuous_(const ObArchiveSendTask &task,
{
int
ret
=
OB_SUCCESS
;
ObLSArchivePersistInfo
info
;
const
ObLSID
&
id
=
task
.
get_ls_id
();
const
ObLSID
id
=
task
.
get_ls_id
();
const
ObArchivePiece
&
piece
=
task
.
get_piece
();
const
ArchiveWorkStation
&
station
=
task
.
get_station
();
if
(
!
ls_task_tuple
.
get_piece
().
is_valid
())
{
...
...
src/logservice/archiveservice/ob_archive_task.h
浏览文件 @
1bb857cd
...
...
@@ -71,8 +71,7 @@ public:
const
LSN
&
start_lsn
,
const
LSN
&
end_lsn
);
uint64_t
get_tenant_id
()
const
{
return
tenant_id_
;
}
const
ObLSID
&
get_ls_id
()
const
{
return
id_
;
}
ObLSID
get_ls_id_copy
()
{
return
id_
;
}
ObLSID
get_ls_id
()
const
{
return
id_
;
}
const
ArchiveWorkStation
&
get_station
()
{
return
station_
;
}
const
LSN
&
get_start_offset
()
const
{
return
start_offset_
;
}
const
LSN
&
get_cur_offset
()
const
{
return
cur_offset_
;
}
...
...
@@ -163,7 +162,7 @@ public:
const
share
::
SCN
&
max_scn
);
bool
is_valid
()
const
;
uint64_t
get_tenant_id
()
const
{
return
tenant_id_
;}
const
ObLSID
&
get_ls_id
()
const
{
return
id_
;
}
ObLSID
get_ls_id
()
const
{
return
id_
;
}
const
ArchiveWorkStation
&
get_station
()
const
{
return
station_
;
}
const
ObArchivePiece
&
get_piece
()
const
{
return
piece_
;
}
const
LSN
&
get_start_lsn
()
const
{
return
start_offset_
;
}
...
...
src/logservice/archiveservice/ob_ls_mgr.cpp
浏览文件 @
1bb857cd
...
...
@@ -479,7 +479,7 @@ int ObArchiveLSMgr::add_task_(const ObLSID &id,
int
ObArchiveLSMgr
::
insert_or_update_ls_
(
const
StartArchiveHelper
&
helper
)
{
int
ret
=
OB_SUCCESS
;
const
ObLSID
&
id
=
helper
.
get_ls_id
();
const
ObLSID
id
=
helper
.
get_ls_id
();
if
(
OB_UNLIKELY
(
!
helper
.
is_valid
()))
{
ARCHIVE_LOG
(
WARN
,
"helper is not valid"
,
KR
(
ret
),
K
(
helper
));
...
...
src/logservice/archiveservice/ob_ls_task.cpp
浏览文件 @
1bb857cd
...
...
@@ -713,7 +713,7 @@ int ObLSArchiveTask::ArchiveDest::push_fetch_log(ObArchiveLogFetchTask &task)
int
ObLSArchiveTask
::
ArchiveDest
::
push_send_task
(
ObArchiveSendTask
&
task
,
ObArchiveWorker
&
worker
)
{
int
ret
=
OB_SUCCESS
;
const
ObLSID
&
id
=
task
.
get_ls_id
();
const
ObLSID
id
=
task
.
get_ls_id
();
if
(
NULL
==
send_task_queue_
)
{
if
(
OB_ISNULL
(
send_task_queue_
=
allocator_
->
alloc_send_task_status
(
id
)))
{
ret
=
OB_ALLOCATE_MEMORY_FAILED
;
...
...
src/logservice/restoreservice/ob_remote_fetch_log_worker.cpp
浏览文件 @
1bb857cd
...
...
@@ -337,7 +337,7 @@ int ObRemoteFetchWorker::submit_entries_(ObFetchLogTask &task)
const
char
*
buf
=
NULL
;
int64_t
size
=
0
;
LSN
lsn
;
const
ObLSID
&
id
=
task
.
id_
;
const
ObLSID
id
=
task
.
id_
;
while
(
OB_SUCC
(
ret
)
&&
!
has_set_stop
())
{
bool
quota_done
=
false
;
if
(
OB_FAIL
(
task
.
iter_
.
next
(
entry
,
lsn
,
buf
,
size
)))
{
...
...
@@ -447,7 +447,7 @@ int ObRemoteFetchWorker::try_retire_(ObFetchLogTask *&task)
int
ObRemoteFetchWorker
::
push_submit_array_
(
ObFetchLogTask
&
task
)
{
int
ret
=
OB_SUCCESS
;
const
ObLSID
&
id
=
task
.
id_
;
const
ObLSID
id
=
task
.
id_
;
DEBUG_SYNC
(
BEFORE_RESTORE_SERVICE_PUSH_FETCH_DATA
);
GET_RESTORE_HANDLER_CTX
(
id
)
{
if
(
OB_FAIL
(
restore_handler
->
submit_sorted_task
(
task
)))
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录