You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@seata.apache.org by "lokidundun (via GitHub)" <gi...@apache.org> on 2025/11/24 10:22:41 UTC

[PR] optimize: support mariadb 3.x [incubator-seata]

lokidundun opened a new pull request, #7807:
URL: https://github.com/apache/incubator-seata/pull/7807

   <!--
       Licensed to the Apache Software Foundation (ASF) under one or more
       contributor license agreements.  See the NOTICE file distributed with
       this work for additional information regarding copyright ownership.
       The ASF licenses this file to You under the Apache License, Version 2.0
       (the "License"); you may not use this file except in compliance with
       the License.  You may obtain a copy of the License at
   
       http://www.apache.org/licenses/LICENSE-2.0
       
       Unless required by applicable law or agreed to in writing, software
       distributed under the License is distributed on an "AS IS" BASIS,
       WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       See the License for the specific language governing permissions and
       limitations under the License.
   -->
   <!-- Please make sure you have read and understood the contributing guidelines -->
   
   - [x] I have read the [CONTRIBUTING.md](https://github.com/apache/incubator-seata/blob/2.x/CONTRIBUTING.md) guidelines.
   - [ ] I have registered the PR [changes](https://github.com/apache/incubator-seata/tree/2.x/changes).
   
   ### Ⅰ. Describe what this PR did
   fixes https://github.com/apache/incubator-seata/issues/5454
   
   ### Ⅱ. Does this pull request fix one issue?
   <!-- If that, add "fixes #xxx" below in the next line, for example, fixes #97. -->
   
   
   ### Ⅲ. Why don't you add test cases (unit test/integration test)? 
   
   
   ### Ⅳ. Describe how to verify it
   
   
   ### Ⅴ. Special notes for reviews
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [PR] optimize: support mariadb 3.x [incubator-seata]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #7807:
URL: https://github.com/apache/incubator-seata/pull/7807#issuecomment-3570099704

   ## [Codecov](https://app.codecov.io/gh/apache/incubator-seata/pull/7807?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :x: Patch coverage is `38.09524%` with `13 lines` in your changes missing coverage. Please review.
   :white_check_mark: Project coverage is 70.92%. Comparing base ([`30de170`](https://app.codecov.io/gh/apache/incubator-seata/commit/30de1705c4b4ba79c9e7009dc1ff8734c8022aa0?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`d4fc65c`](https://app.codecov.io/gh/apache/incubator-seata/commit/d4fc65cc3f682224724f871f4bf37694f255f5cc?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/incubator-seata/pull/7807?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [...a/org/apache/seata/rm/datasource/util/XAUtils.java](https://app.codecov.io/gh/apache/incubator-seata/pull/7807?src=pr&el=tree&filepath=rm-datasource%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fseata%2Frm%2Fdatasource%2Futil%2FXAUtils.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cm0tZGF0YXNvdXJjZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VhdGEvcm0vZGF0YXNvdXJjZS91dGlsL1hBVXRpbHMuamF2YQ==) | 38.09% | [10 Missing and 3 partials :warning: ](https://app.codecov.io/gh/apache/incubator-seata/pull/7807?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@            Coverage Diff            @@
   ##                2.x    #7807   +/-   ##
   =========================================
     Coverage     70.92%   70.92%           
   + Complexity      994      992    -2     
   =========================================
     Files          1322     1322           
     Lines         50175    50188   +13     
     Branches       5932     5936    +4     
   =========================================
   + Hits          35587    35598   +11     
   + Misses        11660    11654    -6     
   - Partials       2928     2936    +8     
   ```
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/incubator-seata/pull/7807?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [...a/org/apache/seata/rm/datasource/util/XAUtils.java](https://app.codecov.io/gh/apache/incubator-seata/pull/7807?src=pr&el=tree&filepath=rm-datasource%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fseata%2Frm%2Fdatasource%2Futil%2FXAUtils.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cm0tZGF0YXNvdXJjZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VhdGEvcm0vZGF0YXNvdXJjZS91dGlsL1hBVXRpbHMuamF2YQ==) | `41.77% <38.09%> (-6.72%)` | :arrow_down: |
   
   ... and [16 files with indirect coverage changes](https://app.codecov.io/gh/apache/incubator-seata/pull/7807/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   [![Impacted file tree graph](https://app.codecov.io/gh/apache/incubator-seata/pull/7807/graphs/tree.svg?width=650&height=150&src=pr&token=tbmHt2ZfxO&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)](https://app.codecov.io/gh/apache/incubator-seata/pull/7807?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   </details>
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [PR] optimize: support mariadb 3.x [incubator-seata]

Posted by "slievrly (via GitHub)" <gi...@apache.org>.
slievrly commented on code in PR #7807:
URL: https://github.com/apache/incubator-seata/pull/7807#discussion_r2562560897


##########
rm-datasource/src/main/java/org/apache/seata/rm/datasource/util/XAUtils.java:
##########
@@ -64,8 +64,15 @@ public static XAConnection createXAConnection(Connection physicalConn, Driver dr
                         } else {
                             return createXAConnection(physicalConn, "oracle.jdbc.xa.client.OracleXAConnection", dbType);
                         }
-                    case JdbcConstants.MARIADB:
-                        return createXAConnection(physicalConn, "org.mariadb.jdbc.MariaXaConnection", dbType);
+                    case JdbcConstants.MARIADB: {
+                        String xaConnectionClassName;
+                        if (isMariaDb3x(driver)) {
+                            xaConnectionClassName = "org.mariadb.jdbc.MariaDbPooledConnection";

Review Comment:
   It is suggested to define a constant.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [PR] optimize: support mariadb 3.x [incubator-seata]

Posted by "lokidundun (via GitHub)" <gi...@apache.org>.
lokidundun commented on code in PR #7807:
URL: https://github.com/apache/incubator-seata/pull/7807#discussion_r2562849737


##########
rm-datasource/src/main/java/org/apache/seata/rm/datasource/util/XAUtils.java:
##########
@@ -64,8 +64,15 @@ public static XAConnection createXAConnection(Connection physicalConn, Driver dr
                         } else {
                             return createXAConnection(physicalConn, "oracle.jdbc.xa.client.OracleXAConnection", dbType);
                         }
-                    case JdbcConstants.MARIADB:
-                        return createXAConnection(physicalConn, "org.mariadb.jdbc.MariaXaConnection", dbType);
+                    case JdbcConstants.MARIADB: {
+                        String xaConnectionClassName;
+                        if (isMariaDb3x(driver)) {
+                            xaConnectionClassName = "org.mariadb.jdbc.MariaDbPooledConnection";

Review Comment:
   I have defined the constant,I’d really appreciate any feedback and let me know if you have any further questions!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org