bryanxtong opened a new issue, #716: URL: https://github.com/apache/incubator-seata-samples/issues/716
### Ⅰ. Issue Description For springboot-feign-seata-xa example, I tested by adding some exceptions to the account module,event it throws exceptions, the inventory database data is still substracted. ### Ⅱ. Describe what happened Tested both with http://[localhost:8084/test/commit](http://localhost:8084/test/commit) and http://[localhost:8084/test/rollback](http://localhost:8084/test/rollback) ### Ⅲ. Describe what you expected to happen It should rollback , nothing will happen, but we can find stock_tbl count is substracted event each time It rolled back. ### Ⅳ. How to reproduce it (as minimally and precisely as possible) just add one line of code "int b = money / 0;" to test the rollback and commit test method. `@Service public class AccountServiceImpl implements AccountService { private static final Logger LOGGER = LoggerFactory.getLogger(AccountService.class); @Resource private JdbcTemplate jdbcTemplate; @Override @Transactional public void debit(String userId, int money) { LOGGER.info("Account Service ... xid: " + RootContext.getXID()); LOGGER.info("Deducting balance SQL: update account_tbl set money = money - {} where user_id = {}", money, userId); int b = money / 0; jdbcTemplate.update("update account_tbl set money = money - ? where user_id = ?", money, userId); LOGGER.info("Account Service End ... "); } }` Minimal yet complete reproducer code (or URL to code): ### Ⅴ. Anything else we need to know? ### Ⅵ. Environment: - JDK version(e.g. `java -version`): 1.8 - Seata client/server version: 2.3.0 - Database version: 8.0.43-1.el9 - OS(e.g. `uname -a`): windows - Others: -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
