Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: Saga state language support "Retry" service when error occurred #1900

Merged
merged 9 commits into from
Nov 28, 2019

Conversation

long187
Copy link
Contributor

@long187 long187 commented Nov 14, 2019

Ⅰ. Describe what this PR did

Feature: Saga state language support "Retry" a service when error occurred

Ⅱ. Does this pull request fix one issue?

#1899

Ⅲ. Why don't you add test cases (unit test/integration test)?

unit tests is passed

Ⅳ. Describe how to verify it

We can run unit test in io.seata.saga.engine.testSimpleRetryStateMachine()

Saga state language json in : /seata/test/src/test/resources/saga/statelang/simple_statelang_with_retry.json

            "Retry": [
                {
                    "Exceptions": ["io.seata.saga.engine.mock.DemoException"],
                    "IntervalSeconds": 1.5,
                    "MaxAttempts": 3,
                    "BackoffRate": 1.5
                },
                {
                    "IntervalSeconds": 1,
                    "MaxAttempts": 3,
                    "BackoffRate": 1.5
                }
            ]

"Exceptions" property not configured, Match current exception if it is net timeout exception.

@codecov-io
Copy link

codecov-io commented Nov 14, 2019

Codecov Report

Merging #1900 into develop will increase coverage by 0.19%.
The diff coverage is 83.78%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #1900      +/-   ##
=============================================
+ Coverage      55.13%   55.33%   +0.19%     
- Complexity      2403     2410       +7     
=============================================
  Files            429      429              
  Lines          14261    14279      +18     
  Branches        1673     1676       +3     
=============================================
+ Hits            7863     7901      +38     
+ Misses          5692     5673      -19     
+ Partials         706      705       -1
Impacted Files Coverage Δ Complexity Δ
.../saga/statelang/domain/impl/AbstractTaskState.java 92.98% <66.66%> (+24.35%) 20 <0> (+2) ⬆️
...statelang/parser/impl/AbstractTaskStateParser.java 92.15% <87.09%> (+15.23%) 12 <2> (+4) ⬆️
...o/seata/server/coordinator/DefaultCoordinator.java 48.41% <0%> (+0.39%) 28% <0%> (ø) ⬇️
...in/java/io/seata/server/session/GlobalSession.java 85.02% <0%> (+0.48%) 68% <0%> (+1%) ⬆️
...very/registry/zk/ZookeeperRegisterServiceImpl.java 64.56% <0%> (+0.78%) 25% <0%> (ø) ⬇️

@zjinlei zjinlei added this to the 1.0 milestone Nov 14, 2019
@slievrly
Copy link
Member

@long187 check style.
image

@slievrly slievrly changed the title Feature: Saga state language support "Retry" a service when error occurred feature: Saga state language support "Retry" service when error occurred Nov 28, 2019
Copy link
Member

@slievrly slievrly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@zhangthen zhangthen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants