[ 
https://issues.apache.org/jira/browse/SCB-1622?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lei Zhang updated SCB-1622:
---------------------------
    Description: 
Currently, Alpha compensation mechanism has some defects [1],When the 
compensation method fails, only the output log without throwing an exception. 
Alpha does not know that the compensation method failed.

 
Step1: Modify the OnConnected method to bidirectional streaming RPC
This will be needed for the Step2
 
Step2: Catch an exception and send a compensation result in the compensation 
method[1] on the Omega side. Alpha waits for compensation result and catching 
exception after calling compensation method
1. Received TxCompensateSucceedAckEvent: transaction completed
2. Received TxCompensateFailedAckEvent: throw 
BusinessCompensationFailureException
3. catch other exception throw OmegaConnectedException 
 
Step3. Added retry and timeout rule to compensate for failures
 Exceeded the number of retries or timeout will change state to suspended
[1] [https://github.com/apache/servicecomb-pack/issues/590]

> Improve the transaction compensation mechanism for FSM
> ------------------------------------------------------
>
>                 Key: SCB-1622
>                 URL: https://issues.apache.org/jira/browse/SCB-1622
>             Project: Apache ServiceComb
>          Issue Type: Task
>          Components: Saga
>            Reporter: Lei Zhang
>            Priority: Major
>
> Currently, Alpha compensation mechanism has some defects [1],When the 
> compensation method fails, only the output log without throwing an exception. 
> Alpha does not know that the compensation method failed.
>  
> Step1: Modify the OnConnected method to bidirectional streaming RPC
> This will be needed for the Step2
>  
> Step2: Catch an exception and send a compensation result in the compensation 
> method[1] on the Omega side. Alpha waits for compensation result and catching 
> exception after calling compensation method
> 1. Received TxCompensateSucceedAckEvent: transaction completed
> 2. Received TxCompensateFailedAckEvent: throw 
> BusinessCompensationFailureException
> 3. catch other exception throw OmegaConnectedException 
>  
> Step3. Added retry and timeout rule to compensate for failures
>  Exceeded the number of retries or timeout will change state to suspended
> [1] [https://github.com/apache/servicecomb-pack/issues/590]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to