[master] fix sampling sql caused txn free route defensive check false positve
This commit is contained in:
parent
ffb515a326
commit
8f6b152ac8
@ -1070,6 +1070,17 @@ int ObDynamicSampling::restore_session(ObSQLSessionInfo *session,
|
||||
session->set_sql_mode(session->get_sql_mode() | SMO_NO_BACKSLASH_ESCAPES);
|
||||
}
|
||||
if (tx_desc != NULL) {//reset origin tx desc.
|
||||
// release curr
|
||||
if (OB_NOT_NULL(session->get_tx_desc())) {
|
||||
auto txs = MTL(transaction::ObTransService*);
|
||||
if (OB_ISNULL(txs)) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_ERROR("can not acquire MTL TransService", KR(ret));
|
||||
session->get_tx_desc()->dump_and_print_trace();
|
||||
} else {
|
||||
txs->release_tx(*session->get_tx_desc());
|
||||
}
|
||||
}
|
||||
session->get_tx_desc() = tx_desc;
|
||||
}
|
||||
}
|
||||
@ -1909,4 +1920,4 @@ bool ObDynamicSamplingUtils::is_ds_virtual_table(const int64_t table_id)
|
||||
// }
|
||||
|
||||
} // end of namespace common
|
||||
} // end of namespace oceanbase
|
||||
} // end of namespace oceanbase
|
||||
|
@ -36,8 +36,8 @@ int64_t MAX_STATE_SIZE = 4 * 1024; // 4KB
|
||||
|
||||
bool ObTxnFreeRouteCtx::is_temp(const ObTxDesc &tx) const
|
||||
{
|
||||
UNUSED(tx);
|
||||
return txn_addr_.is_valid() && txn_addr_ != GCONF.self_addr_;
|
||||
// match against tx_id to allow other txn commit or rollback on temp node
|
||||
return tx_id_ == tx.tx_id_ && txn_addr_.is_valid() && txn_addr_ != GCONF.self_addr_;
|
||||
}
|
||||
void ObTxnFreeRouteCtx::init_before_update_state(bool proxy_support)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user