Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
BackGround
The seata saga mode will support multiple usage methods in the future.
The saga in seata java is implemented based on the state machine.
1) 2) are all implemented based on the state machine engine, 3) can exist independently of the state machine engine. It is completely independent coding of the business and does not require understanding of the state machine process.
The intention of this PR is to support 3) mode
Equivalent to the Saga state machine mode (1), no matter if the user writes a transaction operation, it will always only include ordinary transaction operations based on the transaction type (ServiceTask, choice action)
And compensation transaction operation (compensation), so the tcc-like mode is equivalent to the degraded version of tcc, without the prepare process.
In the first stage, positive/negative transaction operations are directly submitted without waiting. In the second stage, transaction compensation operations will only occur during rollback.
What this PR does:
There is no need for two-phase submission, which means that the two-phase commit of tcc is degraded and will only be executed when the transaction needs to be rolled back.
The second phase compensates the transaction data submitted in the first phase.
Add this annotation to the branch transaction service interface or implementation that needs to use the saga mode.
Special aspects have been rewritten.
saga is action, compensationAction
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: