Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
AdRainty
oceanbase
提交
d0cd76cc
O
oceanbase
项目概览
AdRainty
/
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,体验更适合开发者的 AI 搜索 >>
提交
d0cd76cc
编写于
11月 04, 2022
作者:
O
obdev
提交者:
wangzelin.wzl
11月 04, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix fetch log streamingly failed bug.
上级
0bf9c07b
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
10 addition
and
5 deletion
+10
-5
src/logservice/palf/log_sliding_window.cpp
src/logservice/palf/log_sliding_window.cpp
+7
-4
src/logservice/palf/log_sliding_window.h
src/logservice/palf/log_sliding_window.h
+3
-1
未找到文件。
src/logservice/palf/log_sliding_window.cpp
浏览文件 @
d0cd76cc
...
...
@@ -877,7 +877,8 @@ int LogSlidingWindow::handle_next_submit_log_(bool &is_committed_lsn_updated)
(
void
)
set_last_submit_log_info_
(
begin_lsn
,
log_end_lsn
,
tmp_log_id
,
\
group_entry_header
.
get_log_proposal_id
());
if
(
FOLLOWER
==
state_mgr_
->
get_role
()
||
state_mgr_
->
is_leader_reconfirm
())
{
try_update_committed_lsn_for_fetch_
(
log_end_lsn
,
tmp_log_id
);
try_update_committed_lsn_for_fetch_
(
log_end_lsn
,
tmp_log_id
,
\
group_entry_header
.
get_committed_end_lsn
());
// Advance committed_end_lsn_, follower/reconfirm leader needs
// the order with try_update_committed_lsn_for_fetch_() is important,
// this exec order can avoid trigger failure of next round fetch by sliding_cb()
...
...
@@ -1461,7 +1462,9 @@ void LogSlidingWindow::try_reset_last_fetch_log_info_(const LSN &expected_end_ls
}
}
void
LogSlidingWindow
::
try_update_committed_lsn_for_fetch_
(
const
LSN
&
log_end_lsn
,
const
int64_t
&
log_id
)
void
LogSlidingWindow
::
try_update_committed_lsn_for_fetch_
(
const
LSN
&
log_end_lsn
,
const
int64_t
&
log_id
,
const
LSN
&
log_committed_end_lsn
)
{
bool
need_update
=
false
;
LSN
last_fetch_end_lsn
;
...
...
@@ -1492,9 +1495,9 @@ void LogSlidingWindow::try_update_committed_lsn_for_fetch_(const LSN &log_end_ls
||
log_id
==
last_fetch_max_log_id_
)
{
LSN
committed_end_lsn
;
get_committed_end_lsn_
(
committed_end_lsn
);
ATOMIC_STORE
(
&
last_fetch_committed_end_lsn_
.
val_
,
committed_end_lsn
.
val_
);
ATOMIC_STORE
(
&
last_fetch_committed_end_lsn_
.
val_
,
log_
committed_end_lsn
.
val_
);
PALF_LOG
(
INFO
,
"update last fetch log info"
,
K_
(
palf_id
),
K_
(
self
),
K
(
last_fetch_end_lsn
),
K
(
log_id
),
K_
(
last_fetch_end_lsn
),
K_
(
last_fetch_committed_end_lsn
));
K_
(
last_fetch_end_lsn
),
K_
(
last_fetch_committed_end_lsn
)
,
K
(
committed_end_lsn
)
);
}
else
{
PALF_LOG
(
INFO
,
"last_fetch_max_log_id_ has changed, skip update"
,
K_
(
palf_id
),
K_
(
self
),
K
(
last_fetch_end_lsn
),
K
(
log_id
),
K_
(
last_fetch_max_log_id
),
K_
(
last_fetch_end_lsn
),
...
...
src/logservice/palf/log_sliding_window.h
浏览文件 @
d0cd76cc
...
...
@@ -293,7 +293,9 @@ private:
LSN
&
last_committed_end_lsn
,
int64_t
&
last_fetch_max_log_id
)
const
;
void
try_reset_last_fetch_log_info_
(
const
LSN
&
expected_end_lsn
,
const
int64_t
log_id
);
void
try_update_committed_lsn_for_fetch_
(
const
LSN
&
expected_end_lsn
,
const
int64_t
&
expected_log_id
);
void
try_update_committed_lsn_for_fetch_
(
const
LSN
&
expected_end_lsn
,
const
int64_t
&
expected_log_id
,
const
LSN
&
log_committed_end_lsn
);
void
try_fetch_log_streamingly_
(
const
LSN
&
log_end_lsn
);
int
do_fetch_log_
(
const
FetchTriggerType
&
trigger_type
,
const
common
::
ObAddr
&
dest
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录