Skip to content

bugfix: fix memory leak in MySQL XA mode#7683

Merged
funky-eyes merged 6 commits intoapache:2.xfrom
firmianaQ:2.x
Oct 10, 2025
Merged

bugfix: fix memory leak in MySQL XA mode#7683
funky-eyes merged 6 commits intoapache:2.xfrom
firmianaQ:2.x

Conversation

@firmianaQ
Copy link
Contributor

…ak in com.mysql.cj.jdbc.SuspendableXAConnection.XIDS_TO_PHYSICAL_CONNECTIONS

Ⅰ. Describe what this PR did

Override XABranchXid equals() and hashCode() to fix memory leak in com.mysql.cj.jdbc.SuspendableXAConnection.XIDS_TO_PHYSICAL_CONNECTIONS

Ⅱ. Does this pull request fix one issue?

fixes #7682

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

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

…ak in com.mysql.cj.jdbc.SuspendableXAConnection.XIDS_TO_PHYSICAL_CONNECTIONS
@funky-eyes funky-eyes changed the title bugfix: Override XABranchXid equals() and hashCode() to fix memory leak in com.mysql.cj.jdbc.SuspendableXAConnection.XIDS_TO_PHYSICAL_CONNECTIONS bugfix: fix memory leak in MySQL XA mode Oct 9, 2025
@funky-eyes funky-eyes added this to the 2.6.0 milestone Oct 9, 2025
@funky-eyes funky-eyes added type: bug Category issues or prs related to bug. first-time contributor first-time contributor mode: XA XA transaction mode module/rm-datasource rm-datasource module labels Oct 9, 2025
…ak in com.mysql.cj.jdbc.SuspendableXAConnection.XIDS_TO_PHYSICAL_CONNECTIONS
@codecov
Copy link

codecov bot commented Oct 10, 2025

Codecov Report

❌ Patch coverage is 57.14286% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 61.44%. Comparing base (06ec3fe) to head (c3be495).
⚠️ Report is 1 commits behind head on 2.x.

Files with missing lines Patch % Lines
...org/apache/seata/rm/datasource/xa/XABranchXid.java 57.14% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##                2.x    #7683      +/-   ##
============================================
+ Coverage     61.36%   61.44%   +0.08%     
- Complexity      680      684       +4     
============================================
  Files          1314     1314              
  Lines         49883    49890       +7     
  Branches       5876     5878       +2     
============================================
+ Hits          30611    30657      +46     
+ Misses        16484    16442      -42     
- Partials       2788     2791       +3     
Files with missing lines Coverage Δ
...org/apache/seata/rm/datasource/xa/XABranchXid.java 68.18% <57.14%> (-2.09%) ⬇️

... and 10 files with indirect coverage changes

Impacted file tree graph

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@funky-eyes funky-eyes left a comment

Choose a reason for hiding this comment

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

LGTM

@funky-eyes funky-eyes merged commit 6614996 into apache:2.x Oct 10, 2025
10 of 11 checks passed
slievrly pushed a commit to slievrly/fescar that referenced this pull request Oct 21, 2025
YvCeung pushed a commit to YvCeung/incubator-seata that referenced this pull request Dec 25, 2025
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 mode: XA XA transaction mode module/rm-datasource rm-datasource module type: bug Category issues or prs related to bug.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

XA模式,mysql8.x,设置pinGlobalTxToPhysicalConnection=true会导致内存泄漏

3 participants