Open trisen opened 5 years ago
发起方事务传播不能设置为 DTXPropagation.SUPPORTS
发起方事务传播不能设置为
DTXPropagation.SUPPORTS
去除DTXPropagation.SUPPORTS 正常情况不再报错。 但是在发起方主动发起错误。远端仍然会保存。事物并没有回滚。 管理端日志:2019-03-25 10:26:00.732 INFO 1796 --- [-rpc-service-10] c.c.t.t.s.s.impl.TxExceptionServiceImpl : write tx_exception. WriteTxExceptionDTO(groupId=10b80406b12537, unitId=0ac2aa8daf800e16e93296eaa36e5326, modId=provider-system-core, transactionState=0, registrar=4, remark=[StatementInfo(sql=DELETE FROM tperson WHERE , params=[])])
这里的tperson就是远端保存的表。我看管理端有删除日志,为什么没删除数据?
看到你参与方是TXC模式,你的Dao层需要配置可以获取自增主键,或参考https://www.txlcn.org/zh-cn/docs/setting/client.html,为服务增加业务主键
看到你参与方是TXC模式,你的Dao层需要配置可以获取自增主键,或参考https://www.txlcn.org/zh-cn/docs/setting/client.html,为服务增加业务主键
@Component
public class MysqlPrimaryKeysProvider implements PrimaryKeysProvider {
@Override
public Map<String, List
远程端配置了,仍然没有删除相应记录呀。
管理端日志还是这样: remark=[StatementInfo(sql=DELETE FROM tperson WHERE , params=[])])
看到你参与方是TXC模式,你的Dao层需要配置可以获取自增主键,或参考https://www.txlcn.org/zh-cn/docs/setting/client.html,为服务增加业务主键
我把远程的改成@LcnTransaction 同样效果。
问题又解决吗,我这边也遇到一样的问题~~
tx-manager链接mycat数据库,报java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order LIKE '%'' at l,直接连接数据不会报错
1. Bug Description
正常请求后,两边的数据都入库了。 但是在服务方会报错 在发起方内部人为抛异常,服务方仍然入库了。
2. Environment:
3. Exception Stacktrace
发起方代码:
服务方代码(远端)
服务端异常:
管理端信息:
4. Tour Idea