Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
大炮V587
oceanbase
提交
904210a0
O
oceanbase
项目概览
大炮V587
/
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 搜索 >>
提交
904210a0
编写于
3月 22, 2023
作者:
O
obdev
提交者:
ob-robot
3月 22, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
set upstream before decided trans type in replay_commit_info
上级
9bcdbcde
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
10 addition
and
6 deletion
+10
-6
src/storage/tx/ob_trans_part_ctx.cpp
src/storage/tx/ob_trans_part_ctx.cpp
+10
-6
未找到文件。
src/storage/tx/ob_trans_part_ctx.cpp
浏览文件 @
904210a0
...
...
@@ -2979,6 +2979,10 @@ int ObPartTransCtx::submit_commit_log_()
}
if
(
OB_FAIL
(
ret
))
{
//do nothing
}
else
if
(
is_local_tx_
()
&&
exec_info_
.
upstream_
.
is_valid
())
{
ret
=
OB_ERR_UNEXPECTED
;
TRANS_LOG
(
WARN
,
"unexpected trans type with valid upstream"
,
K
(
ret
),
KPC
(
this
));
}
else
if
(
OB_FAIL
(
log_block
.
add_new_log
(
commit_log
)))
{
if
(
OB_BUF_NOT_ENOUGH
==
ret
)
{
TRANS_LOG
(
WARN
,
"buf not enough"
,
K
(
ret
),
K
(
commit_log
));
...
...
@@ -4401,6 +4405,7 @@ int ObPartTransCtx::replay_commit_info(const ObTxCommitInfoLog &commit_info_log,
TRANS_LOG
(
WARN
,
"set app trace id error"
,
K
(
ret
),
K
(
commit_info_log
),
K
(
*
this
));
}
else
{
// NOTE that set xa variables before set trans type
set_2pc_upstream_
(
commit_info_log
.
get_upstream
());
exec_info_
.
xid_
=
commit_info_log
.
get_xid
();
exec_info_
.
is_sub2pc_
=
commit_info_log
.
is_sub2pc
();
if
(
exec_info_
.
participants_
.
count
()
>
1
)
{
...
...
@@ -4413,19 +4418,18 @@ int ObPartTransCtx::replay_commit_info(const ObTxCommitInfoLog &commit_info_log,
exec_info_
.
trans_type_
=
TransType
::
SP_TRANS
;
}
if
(
commit_info_log
.
is_dup_tx
())
{
set_dup_table_tx
();
mt_ctx_
.
before_prepare
(
timestamp
);
}
if
(
!
is_local_tx_
()
&&
!
commit_info_log
.
get_upstream
().
is_valid
())
{
set_2pc_upstream_
(
ls_id_
);
TRANS_LOG
(
INFO
,
"set upstream to self"
,
K
(
*
this
),
K
(
commit_info_log
));
}
else
{
set_2pc_upstream_
(
commit_info_log
.
get_upstream
());
}
can_elr_
=
commit_info_log
.
is_elr
();
cluster_version_
=
commit_info_log
.
get_cluster_version
();
sub_state_
.
set_info_log_submitted
();
if
(
commit_info_log
.
is_dup_tx
())
{
set_dup_table_tx
();
mt_ctx_
.
before_prepare
(
timestamp
);
}
reset_redo_lsns_
();
ObTwoPhaseCommitLogType
two_phase_log_type
=
ObTwoPhaseCommitLogType
::
OB_LOG_TX_MAX
;
if
(
is_incomplete_replay_ctx_
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录