apache / apache/incubator-seata

建议:关于 seata-integration-tx-api 下的 GlobalTransactional 注解命名问题

Open
#6,951 4 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

现有的注解:

* org.apache.seata.spring.annotation.GlobalLock
* org.apache.seata.spring.annotation.GlobalTransactional

是不是改为这样更合适?:

* org.apache.seata.annotation.GlobalLock
* org.apache.seata.annotation.GlobalTransactional

理由有二:

1. 这两个注解是在公用模块 seata-integration-tx-api 下面的。带个 spring 不合理。
2. 如果其它框架适配比较头疼:(用吧?名字带了 spring;;;不用吧,GlobalTransactionalInterceptorHandler 等代码就不能复用了,要 copy 一堆的代码;;;seata v2 要解耦和公共的意图就变弱了)

### 建议:

* 保留现有的注解。保持兼容(最好,移到 spring 相关的模块下)
* 定义新的注解名。内部代码改用新注解;旧注解通过中转保持兼容。

Contributor guide

Open the contributing guide

Research direction

Review the annotation declarations in seata-integration-tx-api and the usages of GlobalLock, GlobalTransactional, and GlobalTransactionalInterceptorHandler. First determine whether the annotations should move to a framework-neutral package, then define the compatibility approach for existing Spring users; done means the package and migration strategy are agreed and consistently applied.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
backend-api-design, distributed-systems
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.