提交 fded9898 编写于 作者: Z zx0 提交者: LINGuanRen

fix opensource oldCoverity

上级 150d93bb
......@@ -3394,9 +3394,9 @@ OB_INLINE int ObTransService::handle_start_participant_(const ObTransDesc& trans
trans_desc.is_can_elr()))) {
TRANS_LOG(WARN, "init transaction context error", KR(ret), K(partition), K(trans_desc));
} else {
part_ctx->set_session_id(trans_desc.get_session_id());
part_ctx->set_proxy_session_id(trans_desc.get_proxy_session_id());
part_ctx->set_scheduler(trans_id.get_addr());
(void)part_ctx->set_session_id(trans_desc.get_session_id());
(void)part_ctx->set_proxy_session_id(trans_desc.get_proxy_session_id());
(void)part_ctx->set_scheduler(trans_id.get_addr());
(void)part_ctx->set_trans_app_trace_id_str(trans_desc.get_trans_app_trace_id_str());
if (OB_FAIL(part_ctx->start_trans())) {
TRANS_LOG(WARN, "start participant transaction error", KR(ret), K(partition), K(trans_desc));
......
......@@ -1948,17 +1948,22 @@ int ObTransService::clear_branch_for_xa_terminate_(
int ret = OB_SUCCESS;
const int64_t tenant_id = trans_desc.get_tenant_id();
const ObXATransID xid = trans_desc.get_xid();
trans_desc.set_sche_ctx(NULL);
trans_desc.set_trans_end();
if (need_delete_xa_record && OB_FAIL(delete_xa_all_tightly_branch(tenant_id, xid))) {
TRANS_LOG(WARN, "delete all tightly branch from inner table failed", K(ret), K(trans_desc));
}
if (0 == sche_ctx->dec_and_get_xa_ref_count()) {
// this may be repeated exit
TRANS_LOG(INFO, "sche ctx going to exit", K(xid));
sche_ctx->set_exiting();
if (OB_ISNULL(sche_ctx)) {
ret = OB_ERR_UNEXPECTED;
TRANS_LOG(ERROR, "unexpected, sche_ctx is null", K(ret), K(trans_desc));
} else {
trans_desc.set_sche_ctx(NULL);
trans_desc.set_trans_end();
if (need_delete_xa_record && OB_FAIL(delete_xa_all_tightly_branch(tenant_id, xid))) {
TRANS_LOG(WARN, "delete all tightly branch from inner table failed", K(ret), K(trans_desc));
}
if (0 == sche_ctx->dec_and_get_xa_ref_count()) {
// this may be repeated exit
TRANS_LOG(INFO, "sche ctx going to exit", K(xid));
sche_ctx->set_exiting();
}
(void)sche_trans_ctx_mgr_.revert_trans_ctx(sche_ctx);
}
(void)sche_trans_ctx_mgr_.revert_trans_ctx(sche_ctx);
TRANS_LOG(INFO, "clear branch for xa trans when terminate", K(xid), K(trans_desc));
return ret;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册