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 add switch to control whether to register branch #2308

Merged
merged 13 commits into from
Apr 16, 2020

Conversation

long187
Copy link
Contributor

@long187 long187 commented Feb 26, 2020

Ⅰ. Describe what this PR did

Feature:Saga mode add switch to control whether to register branch

In Saga mode, branches are stored by StateMachineEngin at the client, branch rollaback and commit are coordinated by StateMachineEngine, for higher performance, users can switch off register branches by property sagaBranchRegisterEnable

Ⅳ. Describe how to verify it

<bean id="dbStateMachineConfig" class="io.seata.saga.engine.config.DbStateMachineConfig">
    ...
    <property name="sagaBranchRegisterEnable" value="false"></property>
    ...
</bean>

or

seata configuration file

client {
  rm {
    sagaBranchRegisterEnable = false;
  }
}

Run unit test: /seata/test/src/test/java/io/seata/saga/engine/db/StateMachineDBTests.java

@long187 long187 self-assigned this Feb 26, 2020
@long187 long187 added area/Saga type: feature Category issues or prs related to feature request. labels Feb 26, 2020
@codecov-io
Copy link

codecov-io commented Feb 26, 2020

Codecov Report

Merging #2308 into develop will decrease coverage by 0.16%.
The diff coverage is 14.28%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #2308      +/-   ##
=============================================
- Coverage      51.42%   51.26%   -0.17%     
+ Complexity      2807     2805       -2     
=============================================
  Files            553      553              
  Lines          17691    17678      -13     
  Branches        2091     2054      -37     
=============================================
- Hits            9098     9062      -36     
+ Misses          7738     7735       -3     
- Partials         855      881      +26     
Impacted Files Coverage Δ Complexity Δ
...ommon/src/main/java/io/seata/common/Constants.java 50.00% <ø> (ø) 1.00 <0.00> (ø)
...ava/io/seata/core/constants/ConfigurationKeys.java 0.00% <ø> (ø) 0.00 <0.00> (ø)
...in/java/io/seata/core/constants/DefaultValues.java 0.00% <ø> (ø) 0.00 <0.00> (ø)
...in/java/io/seata/server/session/GlobalSession.java 84.25% <0.00%> (-1.07%) 71.00 <0.00> (-1.00)
...ot/autoconfigure/properties/file/RmProperties.java 47.61% <25.00%> (-5.33%) 5.00 <0.00> (ø)
...obuf/convertor/BranchRegisterRequestConvertor.java 90.47% <0.00%> (-9.53%) 3.00% <0.00%> (ø%)
...otobuf/convertor/BranchReportRequestConvertor.java 90.90% <0.00%> (-9.10%) 3.00% <0.00%> (ø%)
...obuf/convertor/BranchRollbackRequestConvertor.java 92.00% <0.00%> (-8.00%) 3.00% <0.00%> (ø%)
...otobuf/convertor/GlobalBeginResponseConvertor.java 92.59% <0.00%> (-7.41%) 3.00% <0.00%> (ø%)
...otobuf/convertor/GlobalCommitRequestConvertor.java 93.75% <0.00%> (-6.25%) 3.00% <0.00%> (ø%)
... and 26 more

@zjinlei zjinlei added this to the 1.2.0 milestone Mar 12, 2020
@slievrly
Copy link
Member

@long187 does the current configuration of saga need to be passed in through the bean configuration? Whether to consider merging with the seata configuration file. A similar configuration item is' seata.client.rm. Reports-success-enable =false '

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

@slievrly slievrly merged commit 42dfc46 into apache:develop Apr 16, 2020
@wangliang181230 wangliang181230 added mode: SAGA SAGA transaction mode and removed area/Saga labels Oct 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mode: SAGA SAGA transaction mode type: feature Category issues or prs related to feature request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants