From 05dc3366a445c9b61b82f9e573cb5ce1c8ab6da3 Mon Sep 17 00:00:00 2001 From: chinaxing Date: Wed, 22 Mar 2023 04:12:12 +0000 Subject: [PATCH] [master][xa][tx-route] fix from normal tx switch to xa trans missed return static --- src/storage/tx/ob_tx_free_route.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/storage/tx/ob_tx_free_route.cpp b/src/storage/tx/ob_tx_free_route.cpp index e829188a3e..6d500c94f1 100644 --- a/src/storage/tx/ob_tx_free_route.cpp +++ b/src/storage/tx/ob_tx_free_route.cpp @@ -854,8 +854,9 @@ int ObTransService::calc_txn_free_route(ObTxDesc *tx, ObTxnFreeRouteCtx &ctx) // if (OB_SUCC(ret)) { if (return_normal_state) { - if (is_xa && is_tx_start) { - // XA START same as START TX + if (is_xa && (is_tx_start || is_tx_switch)) { + // XA START same as START TX, its state may be synced (instead of executed on local) + // hence, we forcedly set to changed ctx.static_changed_ = true; ctx.dynamic_changed_ = true; ctx.parts_changed_ = true;