Uploaded image for project: 'Apache ServiceComb'
  1. Apache ServiceComb
  2. SCB-1622

Improve the transaction compensation mechanism

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • pack-0.6.0
    • Saga
    • None

    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 to Alpha 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
       

      Attachments

        Activity

          People

            Zhangg Lei Zhang
            Zhangg Lei Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1h 40m
                1h 40m