[4.2][4.1][xa] avoid rewrite return code in one phase xa commit
This commit is contained in:
@ -198,12 +198,14 @@ int ObXAService::local_one_phase_xa_commit_(const ObXATransID &xid,
|
|||||||
ObTransID moke_tx_id;
|
ObTransID moke_tx_id;
|
||||||
|
|
||||||
if (OB_FAIL(xa_ctx_mgr_.get_xa_ctx(trans_id, alloc, xa_ctx))) {
|
if (OB_FAIL(xa_ctx_mgr_.get_xa_ctx(trans_id, alloc, xa_ctx))) {
|
||||||
if (OB_FAIL(query_xa_coord_from_tableone(MTL_ID(), xid, coordinator, moke_tx_id, end_flag))) {
|
int tmp_ret = OB_SUCCESS;
|
||||||
if (OB_ITER_END == ret) {
|
if (OB_SUCCESS != (tmp_ret = query_xa_coord_from_tableone(MTL_ID(), xid, coordinator,
|
||||||
|
moke_tx_id, end_flag))) {
|
||||||
|
if (OB_ITER_END == tmp_ret) {
|
||||||
ret = OB_TRANS_XA_NOTA;
|
ret = OB_TRANS_XA_NOTA;
|
||||||
TRANS_LOG(WARN, "xid is not valid", K(ret), K(xid));
|
TRANS_LOG(WARN, "xid is not valid", K(ret), K(xid));
|
||||||
} else {
|
} else {
|
||||||
TRANS_LOG(WARN, "query xa scheduler failed", K(ret), K(xid));
|
TRANS_LOG(WARN, "query xa scheduler failed", K(tmp_ret), K(xid));
|
||||||
}
|
}
|
||||||
} else if (coordinator.is_valid()) {
|
} else if (coordinator.is_valid()) {
|
||||||
ret = OB_TRANS_XA_PROTO;
|
ret = OB_TRANS_XA_PROTO;
|
||||||
@ -211,6 +213,9 @@ int ObXAService::local_one_phase_xa_commit_(const ObXATransID &xid,
|
|||||||
} else {
|
} else {
|
||||||
TRANS_LOG(WARN, "get xa ctx failed", K(ret), K(trans_id));
|
TRANS_LOG(WARN, "get xa ctx failed", K(ret), K(trans_id));
|
||||||
}
|
}
|
||||||
|
if (OB_SUCCESS == ret) {
|
||||||
|
TRANS_LOG(ERROR, "unexpected return code", K(ret), K(xid), K(trans_id));
|
||||||
|
}
|
||||||
} else if (OB_ISNULL(xa_ctx)) {
|
} else if (OB_ISNULL(xa_ctx)) {
|
||||||
ret = OB_ERR_UNEXPECTED;
|
ret = OB_ERR_UNEXPECTED;
|
||||||
TRANS_LOG(WARN, "xa ctx is null", K(ret), K(trans_id));
|
TRANS_LOG(WARN, "xa ctx is null", K(ret), K(trans_id));
|
||||||
|
Reference in New Issue
Block a user