You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "gMan1990 (GitHub)" <gi...@apache.org> on 2018/11/25 11:56:28 UTC

[GitHub] [incubator-dubbo] gMan1990 opened issue #2828: 一般错误级别:指定点对点直连地址的消费者,配置无法继承提供者

https://github.com/apache/incubator-dubbo/blob/46b3458564cd0387d50f26f566556917cb74b999/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ReferenceConfig.java#L329
```
if (url != null && url.length() > 0) { // user specified URL, could be peer-to-peer address, or register center's address.
    String[] us = Constants.SEMICOLON_SPLIT_PATTERN.split(url);
    if (us != null && us.length > 0) {
        for (String u : us) {
            URL url = URL.valueOf(u);
            if (url.getPath() == null || url.getPath().length() == 0) {
                url = url.setPath(interfaceName);
            }
            if (Constants.REGISTRY_PROTOCOL.equals(url.getProtocol())) {
                urls.add(url.addParameterAndEncoded(Constants.REFER_KEY, StringUtils.toQueryString(map)));
            } else {
                urls.add(ClusterUtils.mergeUrl(url, map));
            }
        }
    }
} else { // assemble URL from register center's configuration
```

比如提供者配置了serialization=kryo,然后消费者使用直连:
@Reference(url = "dubbo://127.0.0.1:20880")
根据这段代码,消费者还是使用serialization默认的hessian2
如果是不配置走到```assemble URL from register center's configuration```里就能继承提供者的配置

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2828 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [incubator-dubbo] carryxyh commented on issue #2828: 一般错误级别:指定点对点直连地址的消费者,配置无法继承提供者

Posted by "carryxyh (GitHub)" <gi...@apache.org>.
日志的地方是有点重复了。你可以提交一个pr修复掉。
第一个问题和最后一个问题不明白,继承P端配置和ReferenceConfig有什么关系?
internal里的内容能提供一下么,我在2.6.x分支上是看不到重复的。

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2828 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [incubator-dubbo] gMan1990 commented on issue #2828: 一般错误级别:指定点对点直连地址的消费者,配置无法继承提供者

Posted by "gMan1990 (GitHub)" <gi...@apache.org>.
@carryxyh 
Q1: 比如一个提供者运行着(protocol=dubbo,配置是serialization=kryo)
* 消费者配置直连(peer-to-peer address),此时消费者使用的serialization方式是hessian2
* 消费者不配置(assemble URL from register center's configuration),此时消费者使用的serialization方式是kryo

好吧,可能这也不算什么错误,消费者自定serialization方式也合理。至少我发现了上面两种配置又一个不同点

Q3: 是打包之后的文件,你可以在你本地的maven仓库里解压开来看,或者去仓库下载。。就是本来是一份内容的都变成3份了,比如内容是1行aaa变成3行aaa

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2828 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [incubator-dubbo] gMan1990 commented on issue #2828: 一般错误级别:指定点对点直连地址的消费者,配置无法继承提供者

Posted by "gMan1990 (GitHub)" <gi...@apache.org>.
@carryxyh 
Q1: 比如一个提供者运行着(protocol=dubbo,配置是serialization=kryo)
* 消费者配置直连(peer-to-peer address),此时消费者使用的serialization方式是hessian2
* 消费者不配置(assemble URL from register center's configuration),此时消费者使用的serialization方式是kryo
好吧,可能这也不算什么错误,消费者自定serialization方式也合理。至少我发现了上面两种配置又一个不同点

Q3: 是打包之后的文件,你可以在你本地的maven仓库里解压开来看,或者去仓库下载。。就是本来是一份内容的都变成3份了,比如内容是1行aaa变成3行aaa

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2828 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [incubator-dubbo] carryxyh commented on issue #2828: 一般错误级别:指定点对点直连地址的消费者,配置无法继承提供者

Posted by "carryxyh (GitHub)" <gi...@apache.org>.
q1你是想说配置直连和使用zk的方式,消费者使用的序列化方式不一样是么?这个你能提供一个demo么我看一下。

q3,这个我看到了,确实重复了三遍,这个可能有问题,老版本是不会出现的。我看一下。

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2828 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [incubator-dubbo] carryxyh closed issue #2828: 一般错误级别:指定点对点直连地址的消费者,配置无法继承提供者

Posted by "carryxyh (GitHub)" <gi...@apache.org>.
[ issue closed by carryxyh ]

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2828 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] carryxyh commented on issue #2828: 一般错误级别:指定点对点直连地址的消费者,配置无法继承提供者

Posted by "carryxyh (GitHub)" <gi...@apache.org>.
对于Q1还有问题么?
如果有问题请提供一个demo。
关于Q3请跟踪这里:https://github.com/apache/incubator-dubbo/issues/2842

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2828 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [incubator-dubbo] gMan1990 commented on issue #2828: 一般错误级别:指定点对点直连地址的消费者,配置无法继承提供者

Posted by "gMan1990 (GitHub)" <gi...@apache.org>.
@carryxyh 
Q1: 比如一个提供者运行着(protocol=dubbo,配置是serialization=kryo)
* 消费者配置直连(peer-to-peer address),此时消费者使用的serialization方式是hessian2
* 消费者不配置(assemble URL from register center's configuration),此时消费者使用的serialization方式是kryo

好吧,可能这也不算什么错误,消费者自定serialization方式也合理。至少我发现了上面两种配置又一个不同点

Q2: 如果我要提交应该pr到哪个分支?

Q3: 是打包之后的文件,你可以在你本地的maven仓库里解压开来看,或者去仓库下载。。就是本来是一份内容的都变成3份了,比如内容是1行aaa变成3行aaa

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2828 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [incubator-dubbo] gMan1990 commented on issue #2828: 一般错误级别:指定点对点直连地址的消费者,配置无法继承提供者

Posted by "gMan1990 (GitHub)" <gi...@apache.org>.
@carryxyh 
Q1: 比如一个提供者运行着(protocol=dubbo,配置是serialization=kryo)
* 消费者配置直连(peer-to-peer address),此时消费者使用的serialization方式是hessian2
* 消费者不配置(assemble URL from register center's configuration),此时消费者使用的serialization方式是kryo

好吧,可能这也不算什么错误,消费者自定serialization方式也合理。至少我发现了上面两种配置又一个不同点

Q3: 是打包之后的文件,你可以在你本地的maven仓库里解压开来看,或者去仓库下载。。就是本来是一份内容的都变成3份了,比如内容是1行aaa变成3行aaa

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2828 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org