Coder Social home page Coder Social logo

Dubbo事务补偿问题 about servicecomb-pack HOT 9 CLOSED

apache avatar apache commented on June 19, 2024
Dubbo事务补偿问题

from servicecomb-pack.

Comments (9)

WillemJiang avatar WillemJiang commented on June 19, 2024

请问C事务中断是抛异常吗?因为你使用了@transactional, 如果服务抛异常, 对应的数据库提交动作就不会执行。 不调用C的补偿方法是正确的。 但是B的补偿方法是需要调用的, 这个在Dubbo示例的代码里面是能够正常执行的。 https://github.com/apache/incubator-servicecomb-saga/blob/master/acceptance-tests/acceptance-pack-dubbo-demo/src/test/resources/CExceptionWhenAbAc_scenario.feature

from servicecomb-pack.

airbaby avatar airbaby commented on June 19, 2024

from servicecomb-pack.

WillemJiang avatar WillemJiang commented on June 19, 2024

我们的验收测试用的是dubbo 2.6.1, 你看看能不升级一下。
还有你有没有试过 A-B, A最后抛出异常,看看B有没有回滚。

如果B能回滚,就需要确保调C出错的时候,异常能够在A方法中抛出。

from servicecomb-pack.

airbaby avatar airbaby commented on June 19, 2024

from servicecomb-pack.

WillemJiang avatar WillemJiang commented on June 19, 2024

感觉你是用了MySQL的主从复制功能,这种情况下JPA创建临时表不能同步复制。

from servicecomb-pack.

WillemJiang avatar WillemJiang commented on June 19, 2024

@airbaby Is there any update of this issue?

from servicecomb-pack.

airbaby avatar airbaby commented on June 19, 2024

from servicecomb-pack.

WillemJiang avatar WillemJiang commented on June 19, 2024

这的确是个好消息, 现在系统已经投入生产了吗?
欢迎加入到Saga项目开发中来。

from servicecomb-pack.

WillemJiang avatar WillemJiang commented on June 19, 2024

Just close the issue as it is resolved.

from servicecomb-pack.

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.