liulijun553 opened a new issue #1978: clearAttachments in ConsumerContextFilter may lead to something wrong for cluster URL: https://github.com/apache/incubator-dubbo/issues/1978 dubbo provided many cluster for example: failover,failfast,failsafe,failback,forking,mergeable,broadcast. in FailoverClusterInvoker,dubbo will try another provider when catch RpcException. in BroadcastClusterInvoker,dubbo will call all providers one by one. in FailbackClusterInvoker , dubbo will retry when failed. in ForkingClusterInvoker, dubbo will call all providers in different thread. but ConsumerContextFilter will clearAttachments after call. it's lead to Attachments lost when retry and Muti call in clusterInvoker. dubbo提供了很多不同类型的cluster,例如failover,failfast,failsafe,failback,forking,mergeable,broadcast. 其中FailoverClusterInvoker会做失败转移,调用失败后重试另一台服务器。 BroadcastClusterInvoker会依次调用所有的服务器。 FailbackClusterInvoker中,如果调用失败,会定时重试。 ForkingClusterInvoker中,会在不同的线程中分别调用所有的服务提供方。 但是,dubbo中同时还存在一个filter叫做ConsumerContextFilter,在一次调用完成后会立即清理掉所有的Attachments。所以,不管是FailoverClusterInvoker的失败转移,还是FailbackClusterInvoker的定时重试,抑或是BroadcastClusterInvoker的广播,都会存在问题,因为后续的调用中,Attachments已经全部丢失了。 我认为clearAttachments的正确时机不是在ConsumerContextFilter中,而因该是在cluster级别来控制。
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
