我在Dubbo项目中使用了Seata。有三个项目,其中两个使用sharding-jdbc。我配置并测试了可以回滚这两个项目中的错误,并且在回滚成功之后在undo_log表中生成了数据,并且删除了表数据。但是,当我在以前的方法中添加新的项目方法时,数据无法成功回滚,并且undo_log表中没有生成任何数据。 仔细比较了这三个项目的配置文件和seata-server的日志启动。唯一的区别是,第三个项目在启动时首先提醒RegisterRMRequest {resourceIds ='null',但是第二个项目成功打印了数据库资源的链接地址 报错日志如下:
019-09-21 14:40:32.716 [configOperate_1_2] WARN io.seata.config.FileConfiguration-Could not found property service.disableGlobalTransaction, try to use default value instead.
2019-09-21 14:40:32.718 [main] INFO i.seata.spring.annotation.GlobalTransactionScanner-Initializing Global Transaction Clients ...
2019-09-21 14:40:33.498 [main] INFO io.seata.core.rpc.netty.AbstractRpcRemotingClient-RpcClientBootstrap has started
2019-09-21 14:40:33.503 [main] INFO i.seata.spring.annotation.GlobalTransactionScanner-Transaction Manager Client is initialized. applicationId[my_test_tx_group] txServiceGroup[my_test_tx_group]
2019-09-21 14:40:33.541 [main] INFO io.seata.rm.datasource.AsyncWorker-Async Commit Buffer Limit: 10000
2019-09-21 14:40:33.672 [main] INFO io.seata.core.rpc.netty.AbstractRpcRemotingClient-RpcClientBootstrap has started
2019-09-21 14:40:33.674 [main] INFO i.seata.spring.annotation.GlobalTransactionScanner-Resource Manager is initialized. applicationId[my_test_tx_group] txServiceGroup[my_test_tx_group]
2019-09-21 14:40:33.674 [main] INFO i.seata.spring.annotation.GlobalTransactionScanner-Global Transaction Clients are initialized.
2019-09-21 14:40:38.509 [timeoutChecker_1] INFO io.seata.core.rpc.netty.NettyClientChannelManager-will connect to 10.33.250.239:8091
2019-09-21 14:40:38.515 [timeoutChecker_1] INFO io.seata.core.rpc.netty.NettyPoolableFactory-NettyPool create channel to transactionRole:TMROLE,address:10.33.250.239:8091,msg:< RegisterTMRequest{applicationId='my_test_tx_group', transactionServiceGroup='my_test_tx_group'} >
2019-09-21 14:40:38.673 [timeoutChecker_1] INFO io.seata.core.rpc.netty.NettyClientChannelManager-will connect to 10.33.250.239:8091
2019-09-21 14:40:38.674 [timeoutChecker_1] INFO io.seata.core.rpc.netty.RmRpcClient-RM will register :null
2019-09-21 14:40:38.675 [timeoutChecker_1] INFO io.seata.core.rpc.netty.NettyPoolableFactory-NettyPool create channel to transactionRole:RMROLE,address:10.33.250.239:8091,msg:< RegisterRMRequest{resourceIds='null', applicationId='my_test_tx_group', transactionServiceGroup='my_test_tx_group'} >
2019-09-21 14:40:39.283 [configOperate_1_2] WARN io.seata.config.FileConfiguration-Could not found property transport.serialization, try to use default value instead.
2019-09-21 14:40:39.286 [configOperate_1_2] WARN io.seata.config.FileConfiguration-Could not found property transport.compressor, try to use default value instead.
2019-09-21 14:40:39.374 [NettyClientSelector_RMROLE_1] INFO io.seata.common.loader.EnhancedServiceLoader-load Codec[SEATA] extension by class[io.seata.codec.seata.SeataCodec]
2019-09-21 14:40:39.498 [timeoutChecker_1] INFO io.seata.core.rpc.netty.NettyPoolableFactory-register success, cost 185 ms, version:0.8.0,role:TMROLE,channel:[id: 0x48fcb77f, L:/10.33.250.207:58936 - R:/10.33.250.239:8091]
2019-09-21 14:40:39.498 [timeoutChecker_1] INFO io.seata.core.rpc.netty.RmRpcClient-register RM success. server version:0.8.0,channel:[id: 0x642dea8f, L:/10.33.250.207:58937 - R:/10.33.250.239:8091]
2019-09-21 14:40:39.501 [timeoutChecker_1] INFO io.seata.core.rpc.netty.NettyPoolableFactory-register success, cost 222 ms, version:0.8.0,role:RMROLE,channel:[id: 0x642dea8f, L:/10.33.250.207:58937 - R:/10.33.250.239:8091]
2019-09-21 14:40:41.134 [main] INFO com.alibaba.druid.pool.DruidDataSource-{dataSource-1} inited
2019-09-21 14:40:41.514 [main] INFO io.seata.core.rpc.netty.RmRpcClient-register to RM resourceId:jdbc:mysql://10.33.250.20:3306/shby_db_agma
2019-09-21 14:40:41.516 [main] INFO io.seata.core.rpc.netty.RmRpcClient-register resource, resourceId:jdbc:mysql://10.33.250.20:3306/shby_db_agma
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。