diff --git a/src/sql/ob_sql_trans_control.cpp b/src/sql/ob_sql_trans_control.cpp index 0ba61e8e9..a00fd9146 100644 --- a/src/sql/ob_sql_trans_control.cpp +++ b/src/sql/ob_sql_trans_control.cpp @@ -337,10 +337,10 @@ int ObSqlTransControl::kill_idle_timeout_tx(ObSQLSessionInfo *session) int ObSqlTransControl::kill_tx(ObSQLSessionInfo *session, int cause) { - auto session_id = session->get_sessid(); - LOG_INFO("begin to kill tx", K(cause), K(session_id), KPC(session)); int ret = OB_SUCCESS; - if (session->is_in_transaction()) { + if (!session->get_is_deserialized() && session->is_in_transaction()) { + auto session_id = session->get_sessid(); + LOG_INFO("begin to kill tx", K(cause), K(session_id), KPC(session)); transaction::ObTxDesc *tx_desc = session->get_tx_desc(); auto tx_tenant_id = tx_desc->get_tenant_id(); const ObTransID tx_id = tx_desc->get_tx_id(); diff --git a/src/storage/tx/ob_trans_service_v4.cpp b/src/storage/tx/ob_trans_service_v4.cpp index 74d72a61e..ce5095ac7 100644 --- a/src/storage/tx/ob_trans_service_v4.cpp +++ b/src/storage/tx/ob_trans_service_v4.cpp @@ -157,7 +157,7 @@ int ObTransService::acquire_tx(const char* buf, } if (tx) { REC_TRANS_TRACE_EXT(&tx->get_tlog(), deserialize, - OB_ID(addr), (void*)&tx, + OB_ID(addr), (void*)tx, OB_ID(txid), tx->tx_id_); } TRANS_LOG(TRACE, "acquire tx by deserialize", K(ret), K(*this), KP(buf), KPC(tx));