Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
天地威能
oceanbase
提交
729d6b4e
O
oceanbase
项目概览
天地威能
/
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 搜索 >>
提交
729d6b4e
编写于
12月 02, 2022
作者:
H
Handora
提交者:
OB-robot
12月 02, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[BUG] add upstream for abort req
上级
92bcaa18
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
12 addition
and
5 deletion
+12
-5
src/storage/tx/ob_trans_part_ctx.cpp
src/storage/tx/ob_trans_part_ctx.cpp
+3
-2
src/storage/tx/ob_tx_2pc_msg_handler.cpp
src/storage/tx/ob_tx_2pc_msg_handler.cpp
+4
-0
src/storage/tx/ob_tx_msg.cpp
src/storage/tx/ob_tx_msg.cpp
+1
-1
src/storage/tx/ob_tx_msg.h
src/storage/tx/ob_tx_msg.h
+4
-2
未找到文件。
src/storage/tx/ob_trans_part_ctx.cpp
浏览文件 @
729d6b4e
...
...
@@ -3471,7 +3471,8 @@ bool ObPartTransCtx::is_root() const { return !exec_info_.upstream_.is_valid();
bool
ObPartTransCtx
::
is_leaf
()
const
{
return
exec_info_
.
participants_
.
empty
()
// TODO(handora.qc): is root also a leaf?
// root must not be leaf, because the distributed txn must be composed by
// more than one participants.
&&
!
is_root
();
}
...
...
src/storage/tx/ob_tx_2pc_msg_handler.cpp
浏览文件 @
729d6b4e
...
...
@@ -155,6 +155,7 @@ int ObPartTransCtx::post_msg_(const ObTwoPhaseCommitMsgType& msg_type,
case
ObTwoPhaseCommitMsgType
::
OB_MSG_TX_ABORT_REQ
:
{
Ob2pcAbortReqMsg
abort_req
;
build_tx_common_msg_
(
receiver
,
abort_req
);
abort_req
.
upstream_
=
ls_id_
;
if
(
OB_FAIL
(
post_msg_
(
receiver
,
abort_req
)))
{
TRANS_LOG
(
WARN
,
"rpc post msg failed"
,
K
(
ret
),
K
(
*
this
),
K
(
receiver
),
K
(
msg_type
));
}
...
...
@@ -704,6 +705,9 @@ int ObPartTransCtx::handle_tx_2pc_abort_req(const Ob2pcAbortReqMsg &msg)
if
(
OB_FAIL
(
set_2pc_request_id_
(
msg
.
request_id_
)))
{
TRANS_LOG
(
WARN
,
"set request id failed"
,
KR
(
ret
),
K
(
msg
),
K
(
*
this
));
}
else
if
(
msg
.
upstream_
.
is_valid
()
&&
// upstream may be invalid for orphan msg
OB_FAIL
(
set_2pc_upstream_
(
msg
.
upstream_
)))
{
TRANS_LOG
(
WARN
,
"set upstream failed"
,
KR
(
ret
),
K
(
msg
),
K
(
*
this
));
}
else
if
(
OB_FAIL
(
handle_2pc_req
(
msg_type
)))
{
TRANS_LOG
(
WARN
,
"handle 2pc request failed"
,
KR
(
ret
),
K
(
msg
),
K
(
*
this
));
}
...
...
src/storage/tx/ob_tx_msg.cpp
浏览文件 @
729d6b4e
...
...
@@ -45,7 +45,7 @@ OB_SERIALIZE_MEMBER_INHERIT(Ob2pcPreCommitReqMsg, ObTxMsg, commit_version_);
OB_SERIALIZE_MEMBER_INHERIT
(
Ob2pcPreCommitRespMsg
,
ObTxMsg
,
commit_version_
);
OB_SERIALIZE_MEMBER_INHERIT
(
Ob2pcCommitReqMsg
,
ObTxMsg
,
commit_version_
,
prepare_info_array_
);
OB_SERIALIZE_MEMBER_INHERIT
(
Ob2pcCommitRespMsg
,
ObTxMsg
,
commit_version_
);
OB_SERIALIZE_MEMBER_INHERIT
(
Ob2pcAbortReqMsg
,
ObTxMsg
);
OB_SERIALIZE_MEMBER_INHERIT
(
Ob2pcAbortReqMsg
,
ObTxMsg
,
upstream_
);
OB_SERIALIZE_MEMBER_INHERIT
(
Ob2pcAbortRespMsg
,
ObTxMsg
);
OB_SERIALIZE_MEMBER_INHERIT
(
Ob2pcClearReqMsg
,
ObTxMsg
);
OB_SERIALIZE_MEMBER_INHERIT
(
Ob2pcClearRespMsg
,
ObTxMsg
);
...
...
src/storage/tx/ob_tx_msg.h
浏览文件 @
729d6b4e
...
...
@@ -363,11 +363,13 @@ namespace transaction
{
public:
Ob2pcAbortReqMsg
()
:
ObTxMsg
(
TX_2PC_ABORT_REQ
)
ObTxMsg
(
TX_2PC_ABORT_REQ
),
upstream_
(
share
::
ObLSID
::
INVALID_LS_ID
)
{}
public:
bool
is_valid
()
const
;
// INHERIT_TO_STRING_KV("txMsg", ObTxMsg);
share
::
ObLSID
upstream_
;
INHERIT_TO_STRING_KV
(
"txMsg"
,
ObTxMsg
,
K_
(
upstream
));
OB_UNIS_VERSION
(
1
);
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录