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 provide a switch to skip branch report on branch success, in order to optimize performance. #2151

Merged
merged 4 commits into from
Jan 10, 2020

Conversation

long187
Copy link
Contributor

@long187 long187 commented Jan 7, 2020

Ⅰ. Describe what this PR did

Saga provide a switch to skip branch report on branch success, in order to optimize performance.

Ⅱ. Does this pull request fix one issue?

#2150

Ⅳ. Describe how to verify it

add config attribute client.rm.report.success.enable=false file.conf

client {
  rm {
    report.success.enable = false
  }

execute unit test StateMachineDBTests.java

@codecov-io
Copy link

codecov-io commented Jan 7, 2020

Codecov Report

Merging #2151 into develop will increase coverage by 0.03%.
The diff coverage is 28.57%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #2151      +/-   ##
=============================================
+ Coverage      54.37%   54.41%   +0.03%     
- Complexity      2467     2469       +2     
=============================================
  Files            445      445              
  Lines          14751    14742       -9     
  Branches        1736     1734       -2     
=============================================
+ Hits            8021     8022       +1     
+ Misses          5968     5962       -6     
+ Partials         762      758       -4
Impacted Files Coverage Δ Complexity Δ
...obuf/convertor/BranchRegisterRequestConvertor.java 100% <ø> (ø) 3 <0> (?)
...rotocol/transaction/GlobalStatusResponseCodec.java 50% <ø> (ø) 1 <0> (?)
...rotocol/transaction/UndoLogDeleteRequestCodec.java 62.5% <ø> (ø) 3 <0> (?)
...erializer/seata/protocol/AbstractMessageCodec.java 23.07% <ø> (ø) 2 <0> (?)
...l/transaction/AbstractTransactionRequestCodec.java 50% <ø> (ø) 1 <0> (?)
...alizer/seata/protocol/MergeResultMessageCodec.java 79.48% <ø> (ø) 6 <0> (?)
...rotobuf/convertor/RegisterRMResponseConvertor.java 82.75% <ø> (ø) 3 <0> (?)
...rotocol/transaction/GlobalCommitResponseCodec.java 50% <ø> (ø) 1 <0> (?)
...alizer/seata/protocol/RegisterTMResponseCodec.java 50% <ø> (ø) 1 <0> (?)
...a/serializer/hessian/HessianSerializerFactory.java 75% <ø> (ø) 3 <0> (?)
... and 82 more

Copy link
Member

@xingfudeshi xingfudeshi left a comment

Choose a reason for hiding this comment

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

LGTM.

@@ -48,6 +48,7 @@
private String dbType;
private int transOperationTimeout = DEFAULT_TRANS_OPER_TIMEOUT;
private SagaTransactionalTemplate sagaTransactionalTemplate;
private boolean skipBranchReportOnSuccess;
Copy link
Member

Choose a reason for hiding this comment

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

https://github.com/seata/seata/blob/a1a51e0c3d374ed0f9604012e9aac1f9822a7495/script/client/spring/application.yml#L9 There is a similar function switch in AT mode. If this configuration can be combined?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@long187 long187 requested a review from zjinlei January 9, 2020 02:57
@@ -106,7 +106,7 @@
/**
* The constant CLIENT_REPORT_SUCCESS_ENABLE.
*/
public static final String CLIENT_REPORT_SUCCESS_ENABLE = CLIENT_PREFIX + "report.success.enable";
public static final String CLIENT_REPORT_SUCCESS_ENABLE = CLIENT_RM_PREFIX + "report.success.enable";
Copy link
Member

Choose a reason for hiding this comment

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

need to reset this file, CLIENT_RM_PREFIX = CLIENT_PREFIX + "rm." The configuration name here is a dash, not a dot.
image
image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

8385F44E-C62E-40C2-8A37-EA5A97C2AEF3

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.

Use dots as discussed for this configuration item.

@zjinlei zjinlei merged commit 6ec6ab6 into apache:develop Jan 10, 2020
dangquocbang pushed a commit to dangquocbang/seata that referenced this pull request Jan 14, 2020
* 'develop' of https://github.com/seata/seata: (125 commits)
  optimize: tcc module code style (apache#2103)
  refactor: change the package path of MySQL recognizer (apache#2125)
  optimize: fix query typo (apache#2176)
  refactor: add sql parser type druid as constant (apache#2156)
  test: enhance test coverage of seata common (apache#2170)
  optimize: gracefully close resources (apache#2139)
  Feature: Saga provide a switch to skip branch report on branch success, in order to optimize performance. (apache#2151)
  chore:use serializer instead of codec (apache#2097)
  optimize: spring module code style (apache#2159)
  optimize: Add Dubbo compatibility (apache#2036)
  optimize : seata-rm-datasource module code style (apache#2062)
  bugfix: Saga report branch status incorrect when service retried succeed (apache#2145)
  optimize:optimize log specifications (apache#2146)
  bugfix: when branchRollback failed, it will trigger retry of multi-tc. (apache#2113)
  refactor: create sql parser spi and a druid type sql parser (apache#1703)
  refactor: simplify to make seata-common more readable (apache#2038)
  feature: support FastThreadLocalContextCore (apache#2106)
  optimize: some typos (apache#2120)
  optimize: increase the oracle table meta cache code coverage (apache#2078)
  optimize: some typos (apache#2115)
  ...

# Conflicts:
#	pom.xml
@slievrly slievrly added this to the 1.1.0 milestone Feb 3, 2020
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