hyyyyy77 opened a new issue, #6321: URL: https://github.com/apache/incubator-seata/issues/6321
seata版本 1.6.1 A服务是调用方,分别调用了B服务与C服务,都是通过feign调用,但是在调用B服务的时候,在B服务的方法中使用RootContext.getXID()无法获取A服务传递过来的XID,但是在B服务的feign请求头中查看到了A服务传递过来的xid; 调用C服务时,C服务是会绑定XID的,也就是seata的TransactionPropagationInterceptor中的preHandle方法,但是在调用B服务的时候,没有进入这个方法; 有尝试过自定义拦截器,然后将xid获取然后放入到请求头中,但是没有作用,在拦截器中能获取到xid,但是依然无法进入到seata的preHandle方法,如果在B服务的方法上也贴seata 的@GlobalTransactional注解,那么他就会生成一个新的xid,而不是A服务传递过来的xid, 如果A服务调用B服务时,B服务里面又调用了C服务(并且B服务也贴了@GlobalTransactional),结果就是A服务的xid没有绑定到B服务,然后B服务会生成新的xid,B服务调用C服务后,会将B服务生成的XID传递过C服务;如果B服务不贴@GlobalTransactional,那么就不会有xid, 求助大佬,不知道怎么解决 -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
