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
Update MySQLMaxValueIncrementer to not rely on MYISAM [SPR-15107] #19674
Comments
Juergen Hoeller commented Rolled into master with |
Erwin Vervaet commented Juergen Hoeller, |
Juergen Hoeller commented Erwin Vervaet, indeed, this is designed for a typical Spring-managed environment where For a Java EE environment with JTA transactions, we'd have to accept a second |
Mohamed Abuthahir commented Hi @Juergen Hoeller Right now I am into the same situation you have described about JTA transaction. I am suppose to use JTA because I have two data sources MySQL and DB2. While doing some ID manipulation with MySQL the code calls commit() inside MySQLMaxValueIncrementer.getNextKey() method which is causing the failure. Because it is running in a global transaction. What would be the solution here? |
Mohamed Abuthahir commented @ Michael Minella The above said issue is happening if I am on a distributed transaction where I am using mySQL as my spring metadata and DB2 as my business db.
2018-06-21 23:53:21.390 WARN 23324 --- [ main] com.atomikos.jdbc.AtomikosSQLException : Cannot call method 'commit' while a global transaction is running2018-06-21 23:53:21.390 WARN 23324 --- [ main] com.atomikos.jdbc.AtomikosSQLException : Cannot call method 'commit' while a global transaction is running2018-06-21 23:53:21.456 WARN 23324 --- [ main] c.atomikos.jdbc.AbstractConnectionProxy : Forcing close of pending statement: org.mariadb.jdbc.MariaDbStatement@66434cc82018-06-21 23:53:21.456 INFO 23324 --- [ main] ConditionEvaluationReportLoggingListener : |
Thomas Risberg opened SPR-15107 and commented
We should update MySQLMaxValueIncrementer to not rely on MYISAM for the sequence table since this engine might not always be available. This is the case with the latest MySQL service available in Cloud Foundry. It would be better to do the sequence value update in a separate transaction so we can support any type of storage engine.
Referenced from: pull request #1286, and commits cc53d59, 5c7aee7, 60882ce
The text was updated successfully, but these errors were encountered: