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 support customize whether update last retry log #3372

Merged

Conversation

anselleeyy
Copy link
Contributor

@anselleeyy anselleeyy commented Dec 14, 2020

Ⅰ. Describe what this PR did

add config for saga, support customize whether update last retry log
提供配置,可自定义正向重试和反向补偿重试的日志存储策略,支持在上一次重试日志的基础上,做更新操作

提供全局配置参数:client.rm.sagaRetryPersistModeUpdate、client.rm.sagaCompensatePersistModeUpdate,默认为 false
提供状态机级别、单个状态节点配置参数:retryPersistModeUpdate、compensatePersistModeUpdate,默认为 false

当 client.rm.sagaRetryPersistModeUpdate 或 retryPersistModeUpdate 配置为true时,当前事务节点的重试,基于当前需要重试的事务日志做更新,而不是新增一条重试日志(compensate 参数同理)

Ⅱ. Does this pull request fix one issue?

fixes #3394

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

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@codecov-io
Copy link

codecov-io commented Dec 14, 2020

Codecov Report

Merging #3372 (ce7e216) into develop (2598b16) will decrease coverage by 0.01%.
The diff coverage is 34.28%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #3372      +/-   ##
=============================================
- Coverage      51.58%   51.57%   -0.02%     
- Complexity      3333     3340       +7     
=============================================
  Files            616      616              
  Lines          20198    20233      +35     
  Branches        2531     2535       +4     
=============================================
+ Hits           10420    10435      +15     
- Misses          8734     8751      +17     
- Partials        1044     1047       +3     
Impacted Files Coverage Δ Complexity Δ
...n/src/main/java/io/seata/common/DefaultValues.java 0.00% <ø> (ø) 0.00 <0.00> (ø)
...ava/io/seata/core/constants/ConfigurationKeys.java 0.00% <ø> (ø) 0.00 <0.00> (ø)
...a/io/seata/saga/statelang/domain/StateMachine.java 85.71% <ø> (ø) 0.00 <0.00> (ø)
.../saga/statelang/domain/impl/StateInstanceImpl.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
.../saga/statelang/domain/impl/AbstractTaskState.java 82.60% <33.33%> (-4.70%) 24.00 <2.00> (+2.00) ⬇️
...a/saga/statelang/domain/impl/StateMachineImpl.java 59.32% <33.33%> (-2.95%) 23.00 <2.00> (+2.00) ⬇️
...statelang/parser/impl/AbstractTaskStateParser.java 85.96% <33.33%> (-6.20%) 12.00 <0.00> (ø)
.../statelang/parser/impl/StateMachineParserImpl.java 59.32% <33.33%> (-2.95%) 8.00 <0.00> (ø)
.../autoconfigure/properties/client/RmProperties.java 45.45% <50.00%> (+1.45%) 7.00 <2.00> (+2.00)
...n/src/main/java/io/seata/common/util/IdWorker.java 83.33% <0.00%> (+6.25%) 12.00% <0.00%> (+1.00%)

@anselleeyy anselleeyy changed the title feature: Saga support customize if persist retry and compensate execution log feature: Saga support customize whether update last retry log Dec 21, 2020
Copy link
Contributor

@long187 long187 left a comment

Choose a reason for hiding this comment

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

LGTM

script/client/saga/db/mysql.sql Outdated Show resolved Hide resolved
Copy link
Contributor

@long187 long187 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

@wangliang181230 wangliang181230 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

@long187 long187 left a comment

Choose a reason for hiding this comment

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

LGTM

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.

feature: Saga support customize whether update last retry log
5 participants