[master] fix Txdesc.xa_start_addr when xa restart on orignal node
This commit is contained in:
@ -592,6 +592,7 @@ public:
|
|||||||
const ObXATransID &get_xid() const { return xid_; }
|
const ObXATransID &get_xid() const { return xid_; }
|
||||||
bool is_xa_trans() const { return !xid_.empty(); }
|
bool is_xa_trans() const { return !xid_.empty(); }
|
||||||
bool is_xa_tightly_couple() const { return xa_tightly_couple_; }
|
bool is_xa_tightly_couple() const { return xa_tightly_couple_; }
|
||||||
|
void set_xa_start_addr(common::ObAddr &addr) { xa_start_addr_ = addr; }
|
||||||
common::ObAddr xa_start_addr() const { return xa_start_addr_; }
|
common::ObAddr xa_start_addr() const { return xa_start_addr_; }
|
||||||
void reset_for_xa() { xid_.reset(); xa_ctx_ = NULL; }
|
void reset_for_xa() { xid_.reset(); xa_ctx_ = NULL; }
|
||||||
int trans_deep_copy(const ObTxDesc &x);
|
int trans_deep_copy(const ObTxDesc &x);
|
||||||
|
|||||||
@ -1005,7 +1005,10 @@ int ObXAService::xa_start(const ObXATransID &xid,
|
|||||||
ret = OB_TRANS_XA_INVAL;
|
ret = OB_TRANS_XA_INVAL;
|
||||||
TRANS_LOG(WARN, "invalid flags for xa start", K(ret), K(xid), K(flags));
|
TRANS_LOG(WARN, "invalid flags for xa start", K(ret), K(xid), K(flags));
|
||||||
}
|
}
|
||||||
|
// set xa_start_addr for txn-free-route
|
||||||
|
if (OB_SUCC(ret) && OB_NOT_NULL(tx_desc)) {
|
||||||
|
tx_desc->set_xa_start_addr(GCONF.self_addr_);
|
||||||
|
}
|
||||||
if (OB_FAIL(ret)) {
|
if (OB_FAIL(ret)) {
|
||||||
TRANS_LOG(WARN, "xa start failed", K(ret), K(xid), K(flags), K(timeout_seconds));
|
TRANS_LOG(WARN, "xa start failed", K(ret), K(xid), K(flags), K(timeout_seconds));
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user