Lei Zhang created SCB-1695:
------------------------------

             Summary: Add attribute compensationMode to @Compensable annotation
                 Key: SCB-1695
                 URL: https://issues.apache.org/jira/browse/SCB-1695
             Project: Apache ServiceComb
          Issue Type: Improvement
          Components: Saga
            Reporter: Lei Zhang
            Assignee: Lei Zhang
             Fix For: pack-0.6.0


Pack provides two compensation modes 'forward' and 'reverse'. Users can choose 
which mode to use by configuring the retries property of @Compensable annotation

If retries == 0 then reverse otherwise forward, more detail [1].

This looks confusing, we need to define a clear attribute that represents the 
mode of compensation

I suggest adding a 'mode' attribute to the @Compensable annotation, which 
contains three options: 
 * forward 
 * reverse (default)
 * combine (first forward then reverse)

[[1] 
https://github.com/apache/servicecomb-pack/blob/a89c7cd8b416c9b281fdbe28644cb6b7e2e78f91/omega/omega-transaction/src/main/java/org/apache/servicecomb/pack/omega/transaction/RecoveryPolicyFactory.java|https://github.com/apache/servicecomb-pack/blob/a89c7cd8b416c9b281fdbe28644cb6b7e2e78f91/omega/omega-transaction/src/main/java/org/apache/servicecomb/pack/omega/transaction/RecoveryPolicyFactory.java]



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

Reply via email to