-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Narayana JTA XA transactions doesn't work after mariadb-java-client bump to 3.5.0 as opening datasource connection results in SQLNonTransientConnectionException #44160
Comments
cc @gsmet |
also cc @mmusgrov |
also cc @yrodiere |
Note you need to enable https://s01.oss.sonatype.org/content/repositories/snapshots as a snapshot repository in your Maven settings for Maven to find the dependencies. That said, I can reproduce as well. Full log:
|
Just... every single connection is failing, even the ones for Hibernate's schema initialization, which I don't think run in transactions. TestContainers' This will definitely need investigation; if we're in a rush I'd recommend reverting #44111, but I think that's in 3.17 only, and the release is still a few weeks away. On a related note @gsmet , I think we talked about the risk/effort balance of not having dedicated tests for XA, especially considering they would require their own module to not interfere with non-XA tests in the case of native compilation... looks like the time has come to add these modules? |
Thank you @michalvavrik for opening this issue. I wonder if there is a document with Quarkus and DBs supported versions, is there one. |
@marcosgopen no, we don't test Agroal with specific drivers. From a quick glance at the driver changes from 3.4.1 to 3.5.0 the changes that are most likely to cause issues are the updates on truststore. @michalvavrik can you please verify the TLS settings used ?? |
Reproducer from https://github.com/michalvavrik/mariadb-narayna-jta-xa-repro is using mysql database started trough devservice, there is no customization and no trust store edits. The app is simple, just getting connection for the datasource - https://github.com/michalvavrik/mariadb-narayna-jta-xa-repro/blob/master/src/main/java/org/acme/GreetingResource.java#L17 @barreiro pls look into the reproducer app and comment added by Yoann #44160 (comment) |
mariadb-corporation/mariadb-connector-j@1ce5982 is the commit introducing the change in MariaDB driver Discovered through bisecting mariadb-corporation/mariadb-connector-j@3.4.1...3.5.0 and running the sample app |
@barreiro I think instead that the actual change that caused this issue is XA Pool datasource ensuring close when using XAConnection.close() . They also needed to update the test for it (mariadb-corporation/mariadb-connector-j@a81f0e3#diff-072b4c89a5cf666e9ec822fcb4dcab96035b832ff50c5f7ff59f8e6a0c4958faL199) |
Yes, I suppose so. @barreiro don't hesitate to ping the Narayana team if some help from them is needed. |
Let's revert for now until someone complains about us using an old version: #45034 . But I think we need to isolate the issue and either find a solution on our side in Agroal or Narayana or open a proper issue for the MariaDB JDBC driver. |
FWIW we're discussing this with Luis and the Hibernate team: https://hibernate.zulipchat.com/#narrow/channel/132094-hibernate-orm-dev/topic/MariaDB.20XAConnection.20and.20Connection.23close So far it seems the solution will be opening an issue for the MariaDB JDBC Driver. |
Created upstream issue CONJ-1218 |
Describe the bug
When #44111 got merged, my app with Narayana JTA that uses XA transactions stopped to work because connection cannot be opened for DS that has enabled XA.
Expected behavior
MariaDB works with Narayana JTA XA transactions.
Actual behavior
Connection is closed, communication with DB doesn't work when XA is enabled:
How to Reproduce?
Steps to reproduce the behavior:
git clone [email protected]:michalvavrik/mariadb-narayna-jta-xa-repro.git
cd mariadb-narayna-jta-xa-repro
PASS:
mvn clean test
FAIL:
mvn clean test -Dquarkus.platform.version=999-SNAPSHOT -Dquarkus.platform.group-id=io.quarkus
Output of
uname -a
orver
No response
Output of
java -version
Temurin 21
Quarkus version or git rev
999-SNAPSHOT
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response
The text was updated successfully, but these errors were encountered: