Comments (7)
你的项目是user和order两个不同的项目,并且都有root事务? 如果是这样,tcc_transaction 表 不能共用一个表,会存在你说的第2点问题。
第1点问题 不会出现,各个实例的job在恢复时使用乐观离线锁机制(事务日志的version)来保证只有一个job能恢复一个root事务。
from tcc-transaction.
第一点,是否可考虑使用quartz 数据库持久化 方案,来完全避免
from tcc-transaction.
@changmingxie
如果多个有root事务的项目没办法共用一个tcc_transaction表,是不是也意味着事务的日志和事务恢复机制没办法统一管理?
from tcc-transaction.
@tanhongjie9012 看怎么统一管理了,放在一个地方只是分区到不同的存储(表)也是可以的。多个项目放在同一个存储(表)里不太推荐!
from tcc-transaction.
@changmingxie
我在探讨一种可能性,将多个有root事务的项目共用一个存储(表),然后将事务恢复机制recover抽离出来进行统一的事务恢复处理。
即把框架拆分为两个部分,一个是嵌入到应用AP中的client,进行事务的控制和日志的收集(即框架中tcc-transaction-spring);另一个是独立部署的recover service,根据日志执行统一的事务恢复job。
目前遇到的难题就是recover service进行confirm或rollback阶段,无法在Terminator中根据InvocationContext在本地找到对应的bean执行invoke方法。如果把对应的事务代码都引入到recover service中,那recover service就会跟事务代码高耦合,这似乎并非合理的解决方案。
以上只是一个尝试性的想法,不知作者巨巨你怎么看,或者有什么建议?
from tcc-transaction.
@tanhongjie9012
你提的也是一个不错的思路呢,据我所知,蚂蚁金服的分布式事务服务DTS(https://www.cloud.alipay.com/docs/middleware/xts/index.html)采用的是client-server模式。目前tcc-transaction还不是以服务的形式供,接下来 可以考虑,提供一个更完善的解决方案。
from tcc-transaction.
期待能看到集中式job管理
from tcc-transaction.
Related Issues (20)
- 实现动态全局事务管理开关 HOT 1
- 测试出现的2个问题 HOT 1
- tcc-transaction 1.2.12 Dubbo模块,TccInvokerInvocationHandler 设置参数bug HOT 1
- tcc-transaction 1.2.12 api模块,TransactionXid 定制事务编号 HOT 1
- tcc-transaction没看到有与springboot和springcloud生态整合的说明,是不支持吗? HOT 2
- tcc版本1.2.12,duobbo版本2.7.0,主事务到分支事务xid传参错误问题 HOT 6
- 红包金额表和红包订单表都在一个数据库里面,为什么要用分布式事务呢?直接用 spring 支持的@transactional 不行吗? HOT 2
- tcc-http-sample 样例演示购买超链接 抛异常 java.net.SocketTimeoutException: Read timed out HOT 1
- why TradeOrderServiceProxy.record need @Compensable ? HOT 1
- sample中dubbo方式数据库问题 HOT 1
- tcc-transaction分布式事务管理器操作文档 HOT 1
- 如何避免tcc try阶段业务并发重复调用 HOT 2
- 是否支持防悬挂控制 HOT 4
- tcc-transaction 与Dubbo整合后,三层事务方法,底层服务无法confirm或cancel的问题 HOT 3
- 无,看错
- 作者牛逼 HOT 1
- 谁在使用tcc-transaction HOT 1
- 请问如何防止脏读和脏写? HOT 1
- 客户端无法注册naocs HOT 1
- Dependency org.yaml:snakeyaml, leading to CVE problem HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tcc-transaction.