Skip to content

Conversation

@funky-eyes
Copy link
Contributor

  • I have registered the PR changes.

Ⅰ. Describe what this PR did

Ⅱ. Does this pull request fix one issue?

fixes #7192

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

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@funky-eyes funky-eyes added this to the 2.4.0 milestone Mar 12, 2025
@funky-eyes funky-eyes added type: feature Category issues or prs related to feature request. mode: XA XA transaction mode module/rm-datasource rm-datasource module labels Mar 12, 2025
@funky-eyes funky-eyes requested a review from Copilot March 12, 2025 06:20
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for Kingbase XA mode to the project. Key changes include adding a new test case for Kingbase XA connections, updating XAUtils.java to handle the Kingbase database type, and updating the changelog files in both en-us and zh-cn documentation.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

File Description
rm-datasource/src/test/java/org/apache/seata/rm/datasource/xa/DataSourceProxyXATest.java Added test to verify proper handling of Kingbase XA connection
rm-datasource/src/main/java/org/apache/seata/rm/datasource/util/XAUtils.java Implemented Kingbase case with reflection to create Kingbase XA connection
changes/en-us/2.x.md Updated changelog with Kingbase XA mode support
changes/zh-cn/2.x.md Updated changelog with Kingbase XA mode support
Comments suppressed due to low confidence (1)

rm-datasource/src/main/java/org/apache/seata/rm/datasource/util/XAUtils.java:115

  • Ensure that 'com.kingbase8.core.BaseConnection' is the correct parameter type expected by Kingbase XA connections. If the actual connection type is 'com.kingbase8.jdbc.KbConnection' or a subclass thereof, this mismatch could lead to runtime reflection errors.
Class<?> kingbaseConnectionClass = Class.forName("com.kingbase8.core.BaseConnection");

@codecov
Copy link

codecov bot commented Mar 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 53.60%. Comparing base (baf4364) to head (4e81202).
Report is 1 commits behind head on 2.x.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##                2.x    #7213      +/-   ##
============================================
+ Coverage     53.59%   53.60%   +0.01%     
- Complexity     7119     7123       +4     
============================================
  Files          1171     1171              
  Lines         41602    41607       +5     
  Branches       4875     4875              
============================================
+ Hits          22295    22304       +9     
+ Misses        17197    17195       -2     
+ Partials       2110     2108       -2     
Files with missing lines Coverage Δ
...a/org/apache/seata/rm/datasource/util/XAUtils.java 39.28% <100.00%> (+5.95%) ⬆️

... and 4 files with indirect coverage changes

🚀 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
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.

@slievrly slievrly merged commit 8e519fc into apache:2.x Mar 15, 2025
6 checks passed
@funky-eyes
Copy link
Contributor Author

LGTM license is APL-v2, https://gitee.com/kingbasees/kingbase8/blob/master/kingbase/pom.xml

The driver scope of Kingbase is test, which is not included in the released binary, so I think it should comply with ASF regulations.

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

mode: XA XA transaction mode module/rm-datasource rm-datasource module type: feature Category issues or prs related to feature request.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

seata v2.3.0 Pre-release xa模式使用kingbase数据库提示 not support

2 participants