Skip to content

Dubbo 3.0 provider doesn't register url param “serialization" to ZK. #7578

@LaurenceLiZhixin

Description

@LaurenceLiZhixin
  • I have searched the issues of this repository and believe that this is not a duplicate.
  • I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

  • Dubbo version: 3.0.0-SNAPSHOT
  • Operating System version: win10
  • Java version: jdk8

An example of dubbo3 provider url registered to zk is:

tri://172.27.192.1:50051/com.apache.dubbo.sample.basic.IGreeter?anyhost=true&application=demo-provider&check=false&deprecated=false&dubbo=2.0.2&dynamic=true&generic=false&interface=com.apache.dubbo.sample.basic.IGreeter&methods=sayHello&release=3.0.0-SNAPSHOT&side=provider&threadname=DubboClientHandler-172.27.192.1:50051&threadpool=cached

Which doesn't contains "serialization" key.

But in dubbo/rpc/protocol/tri/TripleInvoker: doInvoke()

 protected Result doInvoke(final Invocation invocation) throws Throwable {
        RpcInvocation inv = (RpcInvocation)invocation;
        String methodName = RpcUtils.getMethodName(invocation);
        inv.setAttachment("path", this.getUrl().getPath());
        inv.setAttachment("serialization", this.getUrl().getParameter("serialization", "hessian2"));
        ...
}

It tries to read serialization type and set default to hessian2, which is confict with the real serialization type "protobuf"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions