You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/12/06 08:33:34 UTC

[GitHub] [dubbo] 18205097282 opened a new issue #9359: 请教关于issues#6899 设置generic参数的问题

18205097282 opened a new issue #9359:
URL: https://github.com/apache/dubbo/issues/9359


   [https://github.com/apache/dubbo/commit/8c1abaf836889059b19d47bb7b71c6e7ee32d624#diff-a994113aee89da0372623a63dff21071562e5d29f765ae0ba596e1f8c5d08a35](url)
   在2.7.11版本中的dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/ClusterUtils.java
   增加了以下代码
   `            if (map.containsKey(GENERIC_KEY)) {
                   copyOfLocalMap.remove(GENERIC_KEY);
               }`
   
   关于改动的解释无法理解:
   GenericKey should as GROUP_KEY, VERSION_KEY, If provider side contains it, use provider side's.
   
   该改动导致当providerURL的generic为false时,URL的generic会被设为为false(在改动前,URL的generic会被设置为true)
   不太理解这个改动是正常行为还是BUG。
   
   


-- 
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-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] elvislou commented on issue #9359: 请教关于issues#6899 设置generic参数的问题

Posted by GitBox <gi...@apache.org>.
elvislou commented on issue #9359:
URL: https://github.com/apache/dubbo/issues/9359#issuecomment-986574282


   经过这个fix,如果provider url里面generic=false, 但是consumer端是泛化调用generic=true,
   但最终merge之后generic以服务端为准,会=false,好像跟实际情况不符合了,这个是by design吗?
   
   @horizonzy @AlbumenJ 麻烦看一下,谢谢。


-- 
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-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] AlbumenJ closed issue #9359: 请教关于issues#6899 设置generic参数的问题

Posted by GitBox <gi...@apache.org>.
AlbumenJ closed issue #9359:
URL: https://github.com/apache/dubbo/issues/9359


   


-- 
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-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] AlbumenJ commented on issue #9359: 请教关于issues#6899 设置generic参数的问题

Posted by GitBox <gi...@apache.org>.
AlbumenJ commented on issue #9359:
URL: https://github.com/apache/dubbo/issues/9359#issuecomment-998890889


   这里的 generic 需要区分几个场景。
   generic 是泛化调用的 key,分为消费端泛化调用和服务端泛化实现两种。
   
   消费端泛化的场景是消费端不依赖具体实现接口,而**服务端拥有具体接口实现**。这个时候消费端可以使用 GerenicService 进行请求,Dubbo 会在服务端将请求信息进行反序列化为具体实现接口的参数。
   服务端泛化的场景是**服务端不依赖具体具体实现接口,服务端在业务侧实现 GerenicService 接口**,消费端可选依赖具体实现接口。这个时候,如果消费端是使用 GerenicService 进行请求的会直接把请求参数发送给服务端,而如果消费端使用的是具体业务的实现接口,那么消费度端会将参数转换为 GerenicService 接口的参数以发送给服务端处理。
   
   provider url 中的 generic 参数是指的**服务端泛化**的场景,这个时候消费端需要感知到服务端是否是泛化实现的,以便预先处理参数(具体实现接口的参数直接发送给服务端,服务端会报类找不到的异常)。
   
   consumer 端配置的泛化是对应的**消费端泛化**的场景,主要是控制生成的代理类是否为 GerenicService。实际上即使消费端配置 generic 为 false,生成的代理类也会实现 GerenicService 接口,业务可以直接强制转型使用。


-- 
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-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org