[master][tx-route] mark static changed when tx switch from IDLE to ABORT
This commit is contained in:
9
deps/oblib/src/lib/utility/ob_tracepoint.h
vendored
9
deps/oblib/src/lib/utility/ob_tracepoint.h
vendored
@ -672,10 +672,13 @@ class EventTable
|
|||||||
EN_FETCH_TABLE_INFO_RPC = 1112,
|
EN_FETCH_TABLE_INFO_RPC = 1112,
|
||||||
// END OF STORAGE HA - 1101 - 2000
|
// END OF STORAGE HA - 1101 - 2000
|
||||||
|
|
||||||
|
// Transaction // 2001 - 2100
|
||||||
// Transaction free route
|
// Transaction free route
|
||||||
EN_TX_FREE_ROUTE_UPDATE_STATE_ERROR = 1150,
|
EN_TX_FREE_ROUTE_UPDATE_STATE_ERROR = 2001,
|
||||||
EN_TX_FREE_ROUTE_ENCODE_STATE_ERROR = 1151,
|
EN_TX_FREE_ROUTE_ENCODE_STATE_ERROR = 2002,
|
||||||
EN_TX_FREE_ROUTE_STATE_SIZE = 1152,
|
EN_TX_FREE_ROUTE_STATE_SIZE = 2003,
|
||||||
|
// Transaction common
|
||||||
|
EN_TX_RESULT_INCOMPLETE = 2011,
|
||||||
|
|
||||||
EVENT_TABLE_MAX = SIZE_OF_EVENT_TABLE
|
EVENT_TABLE_MAX = SIZE_OF_EVENT_TABLE
|
||||||
};
|
};
|
||||||
|
|||||||
@ -864,7 +864,7 @@ int ObSqlTransControl::end_stmt(ObExecContext &exec_ctx, const bool rollback)
|
|||||||
OX (ObTransDeadlockDetectorAdapter::maintain_deadlock_info_when_end_stmt(exec_ctx, rollback));
|
OX (ObTransDeadlockDetectorAdapter::maintain_deadlock_info_when_end_stmt(exec_ctx, rollback));
|
||||||
auto &tx_result = session->get_trans_result();
|
auto &tx_result = session->get_trans_result();
|
||||||
if (OB_FAIL(ret)) {
|
if (OB_FAIL(ret)) {
|
||||||
} else if (tx_result.is_incomplete()) {
|
} else if (OB_E(EventTable::EN_TX_RESULT_INCOMPLETE, session->get_sessid()) tx_result.is_incomplete()) {
|
||||||
if (!rollback) {
|
if (!rollback) {
|
||||||
LOG_ERROR("trans result incomplete, but rollback not issued");
|
LOG_ERROR("trans result incomplete, but rollback not issued");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -557,6 +557,10 @@ int ObTransService::abort_tx_(ObTxDesc &tx, const int cause, const bool cleanup)
|
|||||||
TRANS_LOG(WARN, "try abort tx which has decided",
|
TRANS_LOG(WARN, "try abort tx which has decided",
|
||||||
K(ret), K(tx), K(cause));
|
K(ret), K(tx), K(cause));
|
||||||
} else {
|
} else {
|
||||||
|
// TODO: refactor state switch and put this to there
|
||||||
|
if (ObTxDesc::State::IDLE == tx.state_) {
|
||||||
|
tx.state_change_flags_.STATIC_CHANGED_ = 1;
|
||||||
|
}
|
||||||
tx.state_ = ObTxDesc::State::IN_TERMINATE;
|
tx.state_ = ObTxDesc::State::IN_TERMINATE;
|
||||||
tx.abort_cause_ = cause;
|
tx.abort_cause_ = cause;
|
||||||
abort_participants_(tx);
|
abort_participants_(tx);
|
||||||
|
|||||||
Reference in New Issue
Block a user