apache / incubator-seata

:fire: Seata is an easy-to-use, high-performance, open source distributed transaction solution.
https://seata.apache.org/
Apache License 2.0
25.25k stars 8.77k forks source link

TCC mode two stage cannot be executed #6579

Open funky-eyes opened 4 months ago

funky-eyes commented 4 months ago

Ⅰ. Issue Description

https://github.com/apache/incubator-seata/pull/5153 这个pr导致了2.0 tcc和2.1server不兼容

  1. 2.0的分支注册在tm侧,这个pr限制了只有at模式才允许去找其他的channel尝试下发
  2. 2.1将分支注册锁定在rm侧,tm和rm的application是不同的,所以2.0注册的分支,在升级的过程中,也无法下发到2.1的rm侧去完成
  3. 这个pr为的就是防止相同的resourceid实则不同的应用,然后下发到了另一个应用去导致异常的情况.

This pr caused 2.0 tcc and 2.1 server incompatibility The branch of 2.0 is registered on the tm side. This pr restricts that only at mode is allowed to find other channels to try to deliver. 2.1 locks the branch registration on the rm side, the application of tm and rm is different, so the branch registered in 2.0 cannot be sent to the rm side of 2.1 to complete during the upgrade process The purpose of this pr is to prevent the same resourceid from being used in different applications, and then send it to another application to cause an exception.

Ⅱ. 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

Minimal yet complete reproducer code (or URL to code):

Ⅴ. Anything else we need to know?

Ⅵ. Environment:

funky-eyes commented 2 months ago

我建议将这个otherApp的入参从isAT,改为一个配置项,以便向下兼容 I suggest changing the imported parameter of otherApp from isAT to a configuration item for backward compatibility