-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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
bugfix: fix readonly branch commit errors in Oracle XA transactions. #6707
Merged
Conversation
This file contains 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
…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.
@funky-eyes Accidentally closed #6629 due to misoperation, resubmitted here. |
funky-eyes
added
type: bug
Category issues or prs related to bug.
first-time contributor
first-time contributor
module/rm-datasource
rm-datasource module
module/server
server module
labels
Jul 29, 2024
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.
funky-eyes
approved these changes
Jul 30, 2024
There was a problem hiding this 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
first-time contributor
first-time contributor
module/rm-datasource
rm-datasource module
module/server
server module
type: bug
Category issues or prs related to bug.
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