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

optimize: decouple saga expression handling and remove evaluator package #5966

Merged
merged 4 commits into from Oct 31, 2023

Conversation

ptyin
Copy link
Member

@ptyin ptyin commented Oct 27, 2023

  • I have registered the PR changes.

Ⅰ. Describe what this PR did

The current expression structure (as observed following) is actually quite fragmented, mainly due to the fact that the expression structure processing logic is currently scattered across invocations without a centralized intermediary layer to parse it.

image

Thus, this PR consolidate the parsing of expression structures and adopts the expression structure in the green box in the figure on a backward-compatible basis.

Besides, the differences between the expression and evaluation packages are minimal, as both are used to handle expressions, mainly differing in return values. In fact, they can both be unified under the expression category. Separating them into two systems actually increases developers' understanding cost of the code.

Ⅱ. Does this pull request fix one issue?

fixes #5436

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

This optimization is purely a code optimization, without adding any new functionality. It can be verified through existing saga tests. The expected behavior is the same as usual.

Ⅳ. Describe how to verify it

By existing saga tests.

Ⅴ. Special notes for reviews

Same as pr #5850

@codecov
Copy link

codecov bot commented Oct 27, 2023

Codecov Report

Merging #5966 (b71e377) into 2.x (6d4ab48) will decrease coverage by 0.01%.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##                2.x    #5966      +/-   ##
============================================
- Coverage     48.08%   48.07%   -0.01%     
+ Complexity     4614     4612       -2     
============================================
  Files           911      911              
  Lines         31285    31285              
  Branches       3768     3768              
============================================
- Hits          15042    15041       -1     
- Misses        14727    14728       +1     
  Partials       1516     1516              

see 3 files with indirect coverage changes

@ptyin ptyin marked this pull request as ready for review October 27, 2023 04:20
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

@slievrly slievrly merged commit 4b35f81 into apache:2.x Oct 31, 2023
8 checks passed
@wangliang181230 wangliang181230 added this to the 2.0.0 milestone Nov 21, 2023
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.

seata saga 模式expression计算和spring接耦
3 participants