GithubHelp home page GithubHelp logo

事务发起方发生系统级别异常导致本地事务回滚远程事务成功,但是本地事务日志已经变成commit状态 about myth HOT 5 OPEN

dromara avatar dromara commented on July 22, 2024
事务发起方发生系统级别异常导致本地事务回滚远程事务成功,但是本地事务日志已经变成commit状态

from myth.

Comments (5)

yu199195 avatar yu199195 commented on July 22, 2024

为什么远程成功了,还会有远程造成的错误? 不应该去解决这个问题吗?

from myth.

yu199195 avatar yu199195 commented on July 22, 2024

我改一下吧。之前就不会考虑到这种情况

from myth.

xqxyxchy avatar xqxyxchy commented on July 22, 2024

这个问题是并发测试出现的:
1、远程服务执行是成功的;
2、远程服务返回后,偶发性转换异常(class cast exception),导致发起方事务回滚了;
3、最终结果就是数据不一致且无法补偿,发起方事务回滚、发起方事务日志状态commit、远程事务成功(也是commit);
4、这个偶发性转换异常目前我还没查出原因,但是事务框架对这种情况应该有对应的处理方案,事务日志不应该是“第3点”中的结果;

from myth.

yu199195 avatar yu199195 commented on July 22, 2024

1.首先你要解决偶尔性的转换异常。
2.myth设计的时候,考虑的是,本地服务是成功的情况下,发送消息的成功,而不是整个切面的成功。
3.设想,如果你 的远程rpc已经执行成功了,然后随便抛一个异常,造成发起者不成功?应该怎么处理,继续执行一遍? 如果是,那么业务方就要保证接口的幂等。
4 myth的设计就是在够成功调用到你的rpc服务

from myth.

xqxyxchy avatar xqxyxchy commented on July 22, 2024

1、正在排查那个诡异的偶发问题;
2、目前我这边出现的就是像您所说的第三点的设想,您有什么好的建议不,目前比较纠结这个问题;

from myth.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.