Skip to content
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

Feature http xa #69

Merged
merged 11 commits into from
Jul 11, 2023
Merged

Feature http xa #69

merged 11 commits into from
Jul 11, 2023

Conversation

JackBOBO
Copy link
Contributor

  1. add http xa pattern Support XA #68

@catcherwong catcherwong self-requested a review June 20, 2023 09:15
src/Dtmcli/DtmClient.cs Outdated Show resolved Hide resolved
src/Dtmcli/Xa/XaLocalTransaction.cs Outdated Show resolved Hide resolved
src/Dtmcli/Xa/XaLocalTransaction.cs Outdated Show resolved Hide resolved
src/Dtmcli/Xa/XaLocalTransaction.cs Outdated Show resolved Hide resolved
src/Dtmcli/Xa/XaLocalTransaction.cs Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Jun 27, 2023

Codecov Report

Merging #69 (9207895) into main (10272be) will decrease coverage by 5.29%.
The diff coverage is 15.52%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff             @@
##             main      #69      +/-   ##
==========================================
- Coverage   76.28%   70.99%   -5.29%     
==========================================
  Files          41       44       +3     
  Lines        1754     1903     +149     
==========================================
+ Hits         1338     1351      +13     
- Misses        416      552     +136     
Impacted Files Coverage Δ
src/Dtmcli/Xa/Xa.cs 0.00% <0.00%> (ø)
src/Dtmcli/Xa/XaGlobalTransaction.cs 0.00% <0.00%> (ø)
src/Dtmcli/Xa/XaLocalTransaction.cs 0.00% <0.00%> (ø)
src/DtmCommon/Constant.cs 100.00% <100.00%> (ø)
src/DtmCommon/Imp/DbSpecialDelegate.cs 100.00% <100.00%> (ø)
src/Dtmcli/DtmClient.cs 87.35% <100.00%> (-0.56%) ⬇️
src/Dtmcli/ServiceCollectionExtensions.cs 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@catcherwong catcherwong requested a review from yedf2 June 27, 2023 00:55
@yedf2
Copy link
Contributor

yedf2 commented Jun 28, 2023

For mysql version less than 8.0, connection should be closed after xa end, or else xa commit in another connection will not succeed. It is a bug of mysql, and is fixed in mysql 8

src/Dtmcli/Xa/Xa.cs Outdated Show resolved Hide resolved
@JackBOBO
Copy link
Contributor Author

JackBOBO commented Jun 28, 2023

For mysql version less than 8.0, connection should be closed after xa end, or else xa commit in another connection will not succeed. It is a bug of mysql, and is fixed in mysql 8

There is indeed this issue in versions below MySQL 8, and even after closing the connection after xa end or xa commit, the problem still persists. However, when I add pooling=false to the connection string, it seems to work fine. I suspect that the "MysqlConnector" connection pool cannot support this scenario.

@yedf2
Copy link
Contributor

yedf2 commented Jun 29, 2023

So for XA transaction, you may disable pool.

In the document of dtm, the performance of XA transaction are not high, so disable pooling should be OK

@catcherwong
Copy link
Member

Can we merge this PR and release a new version now?

@JackBOBO
Copy link
Contributor Author

Can we merge this PR and release a new version now?

Of course you can.

@catcherwong catcherwong merged commit fe25d97 into dtm-labs:main Jul 11, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants