[4.1][xa] fix revert xa ctx when handle termiante

This commit is contained in:
obdev 2022-11-29 08:35:42 +00:00 committed by ob-robot
parent b35f223d64
commit f0afbf2d66
2 changed files with 2 additions and 1 deletions

View File

@ -1858,7 +1858,7 @@ int ObXACtx::clear_branch_for_xa_terminate_(const ObXATransID &xid,
is_exiting_ = true;
}
// tx_desc.set_xa_ctx(NULL);
xa_ctx_mgr_->revert_xa_ctx(this);
// xa_ctx_mgr_->revert_xa_ctx(this);
if (delete_branch &&
OB_SUCCESS != (tmp_ret = xa_service_->delete_xa_all_tightly_branch(tenant_id_, xid))) {
TRANS_LOG(WARN, "delete xa tight branch failed", K(ret), K(xid));

View File

@ -2123,6 +2123,7 @@ int ObXAService::handle_terminate_for_xa_branch(const ObXATransID &xid, ObTxDesc
if (OB_SUCCESS != (tmp_ret = xa_ctx->clear_branch_for_xa_terminate(xid, tx_desc, true))) {
TRANS_LOG(WARN, "clear branch for xa terminate failed", K(ret), K(xid), K(tx_id));
}
xa_ctx_mgr_.revert_xa_ctx(xa_ctx);
TRANS_LOG(INFO, "handle terminate for tightly coupled xa branch", K(ret), K(xid), K(tx_id));
}
}