[master][tx-route] do not abort tx if txn has explict savepoint or serializable snapshot

This commit is contained in:
chinaxing
2023-02-24 15:46:42 +00:00
committed by ob-robot
parent 0de4d4a41d
commit 52c45c7403
5 changed files with 19 additions and 12 deletions

View File

@ -539,7 +539,7 @@ int ObBasicSessionInfo::switch_tenant(uint64_t effective_tenant_id)
ret = OB_INVALID_ARGUMENT;
LOG_WARN("invalid tenant_id", K(ret), K(effective_tenant_id));
} else if (OB_NOT_NULL(tx_desc_) && effective_tenant_id != effective_tenant_id_) {
if (tx_desc_->in_tx_or_has_state()) {
if (tx_desc_->in_tx_or_has_extra_state()) {
ret = OB_NOT_SUPPORTED;
// only inner-SQL goes switch_tenant and may fall into such state
// print out error to easy trouble-shot