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

Add attribute mode to @Compensable annotation

    XMLWordPrintableJSON

Details

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

    Description

      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

      Attachments

        Issue Links

          Activity

            People

              zhanglei Lei Zhang
              zhanglei 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 - 0.5h
                  0.5h