[4.2] skip kill tx if session is deserialized
This commit is contained in:
		| @ -337,10 +337,10 @@ int ObSqlTransControl::kill_idle_timeout_tx(ObSQLSessionInfo *session) | |||||||
|  |  | ||||||
| int ObSqlTransControl::kill_tx(ObSQLSessionInfo *session, int cause) | int ObSqlTransControl::kill_tx(ObSQLSessionInfo *session, int cause) | ||||||
| { | { | ||||||
|  |   int ret = OB_SUCCESS; | ||||||
|  |   if (!session->get_is_deserialized() && session->is_in_transaction()) { | ||||||
|     auto session_id = session->get_sessid(); |     auto session_id = session->get_sessid(); | ||||||
|     LOG_INFO("begin to kill tx", K(cause), K(session_id), KPC(session)); |     LOG_INFO("begin to kill tx", K(cause), K(session_id), KPC(session)); | ||||||
|   int ret = OB_SUCCESS; |  | ||||||
|   if (session->is_in_transaction()) { |  | ||||||
|     transaction::ObTxDesc *tx_desc = session->get_tx_desc(); |     transaction::ObTxDesc *tx_desc = session->get_tx_desc(); | ||||||
|     auto tx_tenant_id = tx_desc->get_tenant_id(); |     auto tx_tenant_id = tx_desc->get_tenant_id(); | ||||||
|     const ObTransID tx_id = tx_desc->get_tx_id(); |     const ObTransID tx_id = tx_desc->get_tx_id(); | ||||||
|  | |||||||
| @ -157,7 +157,7 @@ int ObTransService::acquire_tx(const char* buf, | |||||||
|   } |   } | ||||||
|   if (tx) { |   if (tx) { | ||||||
|     REC_TRANS_TRACE_EXT(&tx->get_tlog(), deserialize, |     REC_TRANS_TRACE_EXT(&tx->get_tlog(), deserialize, | ||||||
|                         OB_ID(addr), (void*)&tx, |                         OB_ID(addr), (void*)tx, | ||||||
|                         OB_ID(txid), tx->tx_id_); |                         OB_ID(txid), tx->tx_id_); | ||||||
|   } |   } | ||||||
|   TRANS_LOG(TRACE, "acquire tx by deserialize", K(ret), K(*this), KP(buf), KPC(tx)); |   TRANS_LOG(TRACE, "acquire tx by deserialize", K(ret), K(*this), KP(buf), KPC(tx)); | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user
	 chinaxing
					chinaxing