Self-revolution

Results 12 comments of Self-revolution

``` @Service @RequiredArgsConstructor public class MovePackageServiceImpl implements MovePackageService { private final MovePackageDatabaseHandler movePackageDatabaseHandler; @Override public void movePackage(MovePackageReqBO movePackageReqBO) { String reqJson = JsonUtils.toString(movePackageReqBO); for (int i = 1; ; i++)...

我确定,没加try-catch之前的报死锁异常,捕获异常后,seata报错`mysql release save point error.`,且这个报错是在下一次循环的重试之前,因为我在每次循环后打印了日志 ``` for (int i = 1; ; i++) { //...... try { movePackageDatabaseHandler.movePackageDB(movePackageReqBO.getDbBuffer()); return; } catch (DataVersionException | DeadlockLoserDataAccessException e) { if (i == tryTimes)...

补充一下查询SQL执行计划的结果 ![QQ截图20240124112222](https://github.com/apache/incubator-seata/assets/52819804/fde2fca0-7309-4ad1-ba3f-f77111a9605a)

当查询的字段变多的时候,又可以命中主键,比如增加一个name字段后: ![QQ截图20240124113452](https://github.com/apache/incubator-seata/assets/52819804/f8d2f43b-f13f-448b-9feb-4a107a9f264f)

我通过执行MySQL的分析表命令修复了索引错误,解决了死锁问题。 对于`mysql release save point error`异常这个问题,通过日志可以看出,调用链是很清晰的,我确定没有上层的本地事务。我之前也没有遇到过这个报错信息,我怀疑会不会和`org.springframework.dao.DeadlockLoserDataAccessException`这个异常的出现有关。有没有可能是seata检查全局锁时,执行`SELECT id FROM locator WHERE flag_deleted = 0 AND id IN (9792, 9752) FOR UPDATE`时出现的死锁,导致了`io.seata.rm.datasource.exec.SelectForUpdateExecutor`出现`mysql release save point error`异常

I configured my seata using demo properties in https://github.com/seata/seata/blob/v2.0.0/script/config-center/config.txt , store by mysql. The file gave two orders: `client.rm.tccActionInterceptorOrder=-2147482648`, `client.tm.interceptorOrder=-2147482648`, and no `2147483647` is configured.

```java java.lang.RuntimeException: try to proceed invocation error at io.seata.spring.annotation.AdapterInvocationWrapper.proceed(AdapterInvocationWrapper.java:59) ~[seata-all-2.0.0.jar!/:2.0.0] at io.seata.integration.tx.api.interceptor.handler.AbstractProxyInvocationHandler.invoke(AbstractProxyInvocationHandler.java:33) ~[seata-all-2.0.0.jar!/:2.0.0] at io.seata.spring.annotation.AdapterSpringSeataInterceptor.invoke(AdapterSpringSeataInterceptor.java:45) ~[seata-all-2.0.0.jar!/:2.0.0] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184) ~[spring-aop-6.1.1.jar!/:6.1.1] at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:765) ~[spring-aop-6.1.1.jar!/:6.1.1] at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:717) ~[spring-aop-6.1.1.jar!/:6.1.1] at com.holo.wcs.service.device.instance.device.handler.DeviceHandler$$SpringCGLIB$$0.deviceMethodExecute() ~[classes!/:?] at com.holo.wcs.service.device.instance.device.device.domain.StackerDismantler.poll(StackerDismantler.java:62)...

The error didn't appear when I change seata version to 1.8.0. `DeviceExWrapperException` is an Exception threw by myself, I romoved it and simplified my code and try to find the...