tx-lcn
tx-lcn copied to clipboard
LCN distributed transaction framework, compatible with dubbo, spring cloud and Motan framework, supports various relational databases
 有知道的大佬吗,搞了一天了。
- [ ] I have searched the [issues](https://github.com/codingapi/tx-lcn/issues) of this repository and believe that this is not a duplicate. ### 1. Bug Description 2020-03-24 09:33:27.373 INFO 18496 --- [trap-executor-0] c.n.d.s.r.aws.ConfigClusterResolver...
1.项目采用的springboot2.1.3+springcloud Greenwich.RELEASE+mysql 5.7 2.tx-manager是自己参照官方说明实现的,tx-manager能接收到tc端的注册和事务组创建; PS:之前事务组超时时间设置的是8秒,事务组经常出现超时,后来设置成80秒,事务组不超时了; 3. tc端springboot启动类增加了@EnableDistributedTransaction和@EnableTransactionManagement两个注解 4.tc端使用方式有两种: 1)分布式事务发起者和参与者都采用@LcnTransaction注解不加任何参数 2)分布式事务发起者采用@LcnTransaction注解不加任何参数,参与者@LcnTransaction注解加入propagation = DTXPropagation.SUPPORTS参数 PS:以上这两种方式都试过,都是一样到导致锁表,而且出现过表级锁; 5.每次业务执行完成后查询mysql锁情况,发现数据库连接都没有释放; 6.目前现状: 不管事务正常执行还是事务组超时,事务都不提交和回滚,下次执行业务就会导致数据库表锁等待。 PS:事务执行完和超时后redis中事务组会自动消失; 请问为什么tc客户端事务已经执行完了,事务组不提交和回滚事务呢?
大神,请教一个问题,先调用远程事务,远程事务正确,再调用本地事务,本地事务报错,能回滚,远程事务不回滚,怎么处理? 本地事务代码如下: @LcnTransaction(propagation = DTXPropagation.REQUIRED) @Transactional//事务注解 public ReturnMap save(HttpServletRequest request, HttpServletResponse response,TeacherAttrBean teacherAttrBean){ JSONObject jsonObject = JSONObject.fromObject(sysFegin.saveUserInfo(teacherAttrBean)); System.out.println(1/0); // 抛出异常 } // 远程事务 @TccTransaction(propagation = DTXPropagation.SUPPORTS) @Transactional public ReturnMap saveUser(HttpServletRequest...
 TransactionControlTemplate.class文件 line:156 dtxExceptionHandler.handleNotifyGroupBusinessException(Arrays.asList(groupId, state, unitId, transactionType), e.getCause()); e.getCause() is null
lcn事务不生效
1、已经按照文档排除了,并且进入DataSourceAspect。 2、调用方,和被调用方,我全部用的注解@LcnTransaction 3、调用方式feign。 调用两个服务以后更新数据以后,下一步有一个异常使流程报错,但是数据库依然更新,并没有进行回滚,版本5.0.2.RELEASE,以下是代码片段。 // feign调用 Object mobile = userService.updateMobile("18292822257"); // feign调用 Object token = userService.updateToken("apple two"); log.warn("token: {},mobile :{}",token,mobile); int bug = 1 / 0; /** * 被调用方 *...
目前项目使用LCN做分布式事务。有如下情况: 服务A作为分布式事务发起方,其在发起方法进行了事务操作后,调用了服务B的serviceX.method方法,serviceX.method在进行了服务B的事务操作后,调用了服务B的另一个类的serviceY.log方法,serviceY.log方法是声明了Propagation.REQUIRES_NEW的自治事务。 为了测试Propagation.REQUIRES_NEW,我在serviceX.method中,调用serviceY.log方法之后,使用1/0抛出0除异常。 最终的结果是:两个服务的数据库操作全部回滚了,包括serviceY.log的日志打印。 但是期望的结果以及理论上的结果,应该是serviceY.log是被commit的才对。 因此,比较疑惑,查询资料和看了视频之后,感觉应该是把serviceY.log也加入了Tx-manager的事务组,如果是这个原因,想问下是否有注解可以取消方法加入Tx-manager的事务组。 还请帮忙解答,非常感谢~
- [ ] I have searched the [issues](https://github.com/codingapi/tx-lcn/issues) of this repository and believe that this is not a duplicate. ### 1. Bug Description ### 2. Environment: - JDK version: -...
java.lang.reflect.UndeclaredThrowableException: null at com.zhengt.tx.demoa.service.impl.DemoServiceImpl$$EnhancerBySpringCGLIB$$1ffc798a.methodA() at com.zhengt.tx.demoa.controller.DemoController.methodA(DemoController.java:31) at com.zhengt.tx.demoa.controller.DemoController$$FastClassBySpringCGLIB$$6b76e694.invoke() at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:736) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:84) at com.zhengt.framework.monitor.stdio.StdIOAutoConfiguration$ControllerUsageMonitor.observer(StdIOAutoConfiguration.java:123) at sun.reflect.GeneratedMethodAccessor162.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:627) at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:616) at...
有些东西文档里没写也没地方查 我有这些问题不明白 1. LCN模式支持哪些资源? 譬如mysql oracle mongo4.0, rabbitmq, elasticsearch,redis之类的 能列一下清单吗? 2. LCN模式只能由发起者使用吗?参与者能不能使用这个模式? 3. TCC模式的操作是否要求幂等? 4. 能增加SAGA支持吗? 5. 如TCC这种大量用户开发的模型希望注明需要用户开发每一步的质量标准,以及效果说明 譬如需要支持幂等,需要支持回滚,需要支持补偿 以及按标准开发后,在隔离性,一致性,原子性等衡量标准上产生的效果可以达成哪些效果 现在这些看文档并无法理解