X/Open-XA and ASTC protocols do not allow the RM to unilaterally commit or abort a prepared transaction without instructions from the TM. The RM must retain a prepared transaction until it is apprised of the transaction’s end status from the TM. However, an instance in the cluster can fail when a transaction branch is running on it. The cluster coordinator reinstantiates the prepared transaction of the failed instance during failover recovery. Once the transaction is reinstantiated on the cluster coordinator, the TM can commit or roll back the transaction.
The commands that commit or roll back the reinstantiated
transaction can land on an instance other than the current owner
instance. In this scenario:
For XA transactions – the server migrates the connection to the owner instance, which processes the request.
For ASTC transactions – the instance receiving the commit or rollback command acts as a proxy by forwarding the request to the owner instance for processing and then sending the reply to the TM.
Only prepared transaction branches on the failed instance are reinstantiated during failover recovery. If a transaction branch running on a failed instance is not yet prepared, the clustered Adaptive Server rolls back its work during failover recovery.