apache / apache/incubator-seata

SEATA 分布式事务模式问题

Open
#5,482 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
26k
Forks
8.8k
Avg merge
1d 8h
Merged PRs (30d)
4

Description

### Ⅰ. Issue Description

看官方文档,分布式事务支持AT,TCC和SAGA.

我看了seata-sample项目,貌似客户端口项目里面的application.yml文件没有地方指定到底是AT, TCC还是SAGA模式.

我的问题是,是不是在应用RM中用了@LocalTCC就是TCC模式,在应用中用了SAGA状态机器就是SAGA模式?不需要再application.yml里面显式指定分布式事务?

另一方面,我在script/client/spring/application.yml里面看到seata:data-source-proxy-mode: AT. 这个地方是可以指定事务模式吗?

但是我在project\seata-1.6.1\seata-spring-autoconfigure\seata-spring-autoconfigure-client\src\main\resources\META-INF\additional-spring-configuration-metadata.json这个文件里面又只看到支持AT和XA。对应的内容如下:

"hints": [
{
"name": "seata.data-source-proxy-mode",
"values": [
{
"value": "AT",
"description": "the default mode."
},
{
"value": "XA"
}
]
},

麻烦指导一下,如何配置才能使得应用是运行在AT,TCC还是SAGA模式下面?

### Ⅱ. Describe what happened

If there is an exception, please attach the exception trace:

```
Just paste your stack trace here!
```

### Ⅲ. Describe what you expected to happen

### Ⅳ. How to reproduce it (as minimally and precisely as possible)

1. xxx
2. xxx
3. xxx

### Ⅴ. Anything else we need to know?

### Ⅵ. Environment:

- JDK version :
- Seata version: 1.6
- OS :
- Others:

Contributor guide

Open the contributing guide

Research direction

Read the Seata sample application.yml, script/client/spring/application.yml, and seata-spring-autoconfigure-client/src/main/resources/META-INF/additional-spring-configuration-metadata.json. Compare the documented AT, TCC, SAGA, XA, and @LocalTCC configuration references. Done means the documentation clearly explains how each transaction mode is selected and whether application.yml requires an explicit setting.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
backend, distributed-systems
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.