[master] disable free-route when has access tx level temptable

This commit is contained in:
chinaxing
2023-06-28 08:18:18 +00:00
committed by ob-robot
parent 9ee1f2b890
commit 84f856e19d

View File

@ -1064,10 +1064,16 @@ int ObTransService::calc_txn_free_route(ObTxDesc *tx, ObTxnFreeRouteCtx &ctx)
bool ObTransService::need_fallback_(ObTxDesc &tx, int64_t &total_size)
{
bool fallback = false;
if (tx.with_temporary_table()) {
TRANS_LOG(TRACE, "with tx level temp-table");
fallback = true;
} else {
total_size = OB_E(EventTable::EN_TX_FREE_ROUTE_STATE_SIZE, tx.tx_id_) tx.estimate_state_size();
if (total_size > MAX_STATE_SIZE) {
TRANS_LOG(TRACE, "tx state exceed max allowed", K(total_size), K(MAX_STATE_SIZE));
fallback = true;
}
}
return fallback;
}