baomidou / dynamic-datasource

dynamic datasource for springboot 多数据源 动态数据源 主从分离 读写分离 分布式事务
https://www.kancloud.cn/tracy5546/dynamic-datasource/2264611
Apache License 2.0
4.75k stars 1.19k forks source link

关于本地事务的一个问题 #615

Closed MQPearth closed 10 months ago

MQPearth commented 10 months ago

Please fill it out carefully, or it will be closed. 请认真填写,不然会直接关闭。

Enviroment

JDK Version(required): jdk8+ SpringBoot Version(required): 2.6.14 dynamic-datasource-spring-boot-starter Version(required): 3.5.1,4.2.0

druid Version(optional):

Describe what happened

关于DSTransactional这个本地事务, 假如我有A,B两库, 修改数据后通知对应数据库连接进行commit,

A连接 接到commit, 成功, B连接 接到commit, 因为网络原因失败

这种情况, A库的操作能回滚吗

Steps to reproduce

huayanYu commented 10 months ago

just try

MQPearth commented 10 months ago

okay