bugfix: fix readonly branch commit errors in Oracle XA transactions. #6707
Merged
funky-eyes merged 14 commits intoapache:2.xfrom Jul 30, 2024
Merged
bugfix: fix readonly branch commit errors in Oracle XA transactions. #6707funky-eyes merged 14 commits intoapache:2.xfrom
funky-eyes merged 14 commits intoapache:2.xfrom
Conversation
…e XA transactions.
…nd MSSQL Server (2022)—only Oracle has read-only optimization; the others do not provide read-only feedback. Therefore, the database type check can be eliminated here.
Contributor
Author
|
@funky-eyes Accidentally closed #6629 due to misoperation, resubmitted here. |
funky-eyes
reviewed
Jul 29, 2024
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 2.x #6707 +/- ##
============================================
- Coverage 50.47% 50.47% -0.01%
+ Complexity 5831 5830 -1
============================================
Files 1051 1051
Lines 36340 36347 +7
Branches 4319 4325 +6
============================================
+ Hits 18342 18345 +3
+ Misses 16183 16181 -2
- Partials 1815 1821 +6
|
…d in pull request apache#6687, they are also removed here.
YvCeung
pushed a commit
to YvCeung/incubator-seata
that referenced
this pull request
Dec 25, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Ⅰ. Describe what this PR did
fix the issue of readonly branch commit errors in Oracle XA transactions, which leads to long-running transactions being unable to commit and causing unreadable states.
Solution Logic:
When the database is Oracle and the prepare result is XA_RDONLY, notify TC that the current branch status is BranchStatus.PhaseOne_RDONLY (a newly added state to address this issue). During global commit, for branches with this status type, delete the branch log directly and ignore it.
Ⅱ. Does this pull request fix one issue?
fixes #6512
Original pull request: #6629
Ⅲ. Why don't you add test cases (unit test/integration test)?
Ⅳ. Describe how to verify it
Based on the problematic local project instance, the verification includes:
Whether the Seata TC frontend displays normally;
In Seata TM managing multiple RMs, whether it functions correctly when there is one or more readonly branches; whether it functions correctly when there are no readonly branches; and whether it functions correctly when there are only one or more readonly branches.
Ⅴ. Special notes for reviews