wxbty / meepo Goto Github PK
View Code? Open in Web Editor NEW基于ByteJta,仿GTS实现的分布式事务框架
基于ByteJta,仿GTS实现的分布式事务框架
现象:
集成kryo时,服务正常注册, 消费者可发现服务方, 但是调用服务的时候出现【com.alibaba.dubbo.rpc.RpcException: Failfast invoke providers ... 】. 切换成默认协议正常通讯。
跟踪:
从 DecodeableRpcInvocation 的 decode() 方法中, 抛出了【Found interface org.objectweb.asm.MethodVisitor, but class was expected】这样的错误。
原因:
master版本中的 jta-core 默认引入 cglib:cglib-2.2.2, 而我引入的 com.esotericsoftware:kryo:jar:4.0.0 依赖 org.ow2.asm:asm:jar:5.0.4, asm版本较低所导致。
方案:
将 jta-core 中的cglib 升级为 3.2.5 后, 运行正常。
XA 本身是可以保证数据的一致性的, 直接用普通的begin commit/rollback 就可以了。因为前置镜像和后置镜像以及 txc_lock可以在很大程度上保证资源不会被修改(也有可能通过命令行或者其他的发送绕过txc_lock检查的,这时候就可能数据不一致)。我觉得不需要数据库的XA。
我在Spring boot 中使用的是注解方式来获取ApplicationConfig, 但是启动的时候TransactionEndpointPostProcessor 中抛出异常。 跟踪后发现, 现有的写法不支持ConfigurationClassBeanDefination 。
刚开始看源码,回滚时候的ABA问题好像没处理,还是我没找到地方?--前面有锁逻辑,有空接着看下。估计跑的那次异常是其他原因。
先关闭吧。
不知道作者是否能分离这两个实现,数据库提交/回滚部分单独成项目,这样解耦后能方便大家复用源码
eg:服务A 调用 服务B,服务B中的本地事务失效
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.