although atomikos rollback, but data still exist in database
See original GitHub issueBug Report
For English only, other languages will not accept.
Before report a bug, make sure you have:
- Searched open and closed GitHub issues.
- Read documentation: ShardingSphere Doc.
Please pay attention on issues you submitted, because we maybe need more details. If no response more than 7 days and we cannot reproduce it on current information, we will close it.
Please answer these questions before submitting your issue. Thanks!
Which version of ShardingSphere did you use?
4.0.0-RC1
Which project did you use? Sharding-JDBC or Sharding-Proxy?
Sharding-JDBC
Expected behavior
the use case as blow (ps : use atomikos)
@Transactional
public void xaTransaction() {
userMapper.insertUser(887, 20);
throw new RuntimeException();
}
the end line with throw RuntimeException, so the insert data user while be rollback
Actual behavior
although atomikos execute rollback, but data still exist in database;
Reason analyze (If you can)
Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
Example codes for reproduce this issue (such as a github link).
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
although atomikos rollback, but data still exist in database #2499
Before report a bug, make sure you have: Searched open and closed GitHub issues. Read documentation: ShardingSphere Doc. Please pay attention on ...
Read more >Transaction rollbacks, but a record is inserted - Stack Overflow
Clearly your database insert is not happening within the scope of your transaction manager's current transaction. A few ideas:.
Read more >Rollback in atomikos transaction causes partial commit of data
I am using JPA and this is my configuration: @Entity @Table(name = "EntityA") public class EntityA implements Serializable
Read more >A Guide to Atomikos | Baeldung
Atomikos is a transaction library for Java applications. In this tutorial, we'll understand why and how to use Atomikos.
Read more >Spring @Transactional mistakes everyone did - Medium
Two different data sources. For example, we have created a new version of the datastore but still have to maintain the old one...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

you have open boot autoconfiguration,boot have discovery atomikos jar, so it instance atomikos transaction manager directory, but this is not what sharding need.
got it, thanks again