-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
Two datasources one datasources TX can not be roll-backed #2053
Comments
AbstractConnectionAdapter.setAutoCommit() |
Use Spring-Boot to build the project. |
Hello, the version 1.5.4.1 is too old, please use 3.x. |
Now a little emergency, could you give some good solution? |
Bug Fixed: for example: @transactional(rollbackFor = Exception.class, value = "clusterDataSourceTransactionManager") clusterDataSourceTransactionManager is the DB B TransactionManager declear, so the DB A need use masterDataSourceTransactionManager |
Out of service of this version, it is really too old. |
Bug Report:
1:there are two database A and B, A data sources declared @primary
2:Do a test on the DB A that insert multiple record to one table, the DB A transaction can be rock-backed when code throws Exception
3:Do a test on the DB B, but It can not be rock-backed, there have a few record be inserted to the table.
4: If move the @primary declare to the database B, the transaction can be rock-backed
Expect:
1:The test can be rock-backed successfully on the DB B.
sharding dependences:
<sharding.jdbc.core.version>1.5.4.1</sharding.jdbc.core.version>
<sharding.jdbc.transaction.storage.version>1.5.4.1</sharding.jdbc.transaction.storage.version>
<sharding.jdbc.config.spring.version>1.5.4.1</sharding.jdbc.config.spring.version>
Similar issure: #213
Debuged the sharding code found the cachedConnections is empty and then the setAutoCommit=true
Please give some help, tks
The text was updated successfully, but these errors were encountered: