wxrqforever commented on issue #7163: URL: https://github.com/apache/incubator-seata/issues/7163#issuecomment-2678071512
> 可以将顺序改动一下,比如先执行AT分支,然后让调用python服务的方法单独成为一个tcc分支,不要将代码都写在tcc的 prepare中 还是以A->B->C(Python)这样的调用链为例,我理解想表达的就是让原本是由A发起的TCC,改为在B发起TCC(调用C的部分)。但是这么做有两个问题,一是在使用上有些不直观,如果这么用的话相当于于有个隐藏约束,如果要在tcc发起rpc,调用的接口的下游不能包含有写db操作,这里其实对B而言下游C,C是python写的,所以可以,如果C也是java,这就意味着还需要其他业务逻辑的调整,调整到不包括写操作为止。另一个,即使改为在B发起TCC,如果未来C做了重构,变成了JAVA并且接入seata,则相对应B这里也需要改动,这不太利于维护,很难察觉到有这层关系在。 总的来说,既然在tcc模式下,发起tcc的应用中比如prepare方法里,at模式是不会生效的,这里不就隐含着tcc模式的发起过程中,其实at模式是不应该生效的,那其实正在去定义tcc范围,下游调用的接口也应该在这个范围内,为什么不能考虑在组件传播上事务信息时,考虑当前的分支模式,如果是at才继续传播。 <img width="679" alt="Image" src="https://github.com/user-attachments/assets/bbca3519-3e92-4802-8535-cdd2efb7a23d" /> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@seata.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@seata.apache.org For additional commands, e-mail: notifications-h...@seata.apache.org