question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

although atomikos rollback, but data still exist in database

See original GitHub issue

Bug Report

For English only, other languages will not accept.

Before report a bug, make sure you have:

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).

https://github.com/EvanDylan/sharding-samples.git

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
cherrylzhaocommented, Jun 6, 2019

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

0reactions
EvanDylancommented, Jun 10, 2019

got it, thanks again

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found