apache / apache/incubator-seata-samples
和sharding整合的问题
- Dominant language
- Java
- Stars
- 2.4k
- Forks
- 2k
- PR merge metrics
- No merged PRs in 30d
Description
使用的是springcloud-seata-sharding-jdbc-mybatis-plus-samples这个示例。两个服务,order和 product,order调用product。但是order和product在seata配置上有个关键性的不一样:seata.enable-auto-data-source-proxy=false,product那里是默认也就是true。好的,这样的配置运行不会报错,但是如果有个需求是从product调用order,产生分布式事务,请求就会报错。这个日了狗的问题找了我一整天,最后发现所有服务自动自数据源代理都默认,然后不用sharding的全局事务注解,使用seata的@GlobalTransactional注解反而正常。但是这样又不是官方推荐做法,想问这个到底要怎么整???
Contributor guide
Research direction
Start with the springcloud-seata-sharding-jdbc-mybatis-plus-samples example and compare the Seata data-source proxy settings in the order and product services. Reproduce a distributed transaction initiated by product calling order, then verify the configuration and transaction annotation approach that makes the flow complete without errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- databases, distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100