-
Notifications
You must be signed in to change notification settings - Fork 26.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
protosubff : heartbeat data is null causes connect close #4645
Conversation
...dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/exchange/codec/ExchangeCodec.java
Outdated
Show resolved
Hide resolved
...dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/exchange/codec/ExchangeCodec.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chenyu2016 pls. take a look at my comments.
ps, the following failure is found from travis CI 'HeartbeatHandlerTest.testHeartbeat:95 expected: <0> but was: <2>'. It will not happen if your change follows my suggestion. |
@chenyu2016 CI still fails:
|
You're right.I have revised it. I think it's really redundant for me to do so.
…------------------ 原始邮件 ------------------
发件人: "Ian Luo"<[email protected]>;
发送时间: 2019年7月25日(星期四) 上午10:12
收件人: "apache/dubbo"<[email protected]>;
抄送: "疺喡亻苼"<[email protected]>;"Mention"<[email protected]>;
主题: Re: [apache/dubbo] protosubff : heartbeat data is null causes connectclose (#4645)
@beiwei30 commented on this pull request.
In dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/exchange/codec/ExchangeCodec.java:
@@ -378,7 +379,11 @@ protected void encodeData(ObjectOutput out, Object data) throws IOException { } private void encodeEventData(ObjectOutput out, Object data) throws IOException { - out.writeObject(data); + if(data != null) { + out.writeObject(data);
I think it's fine, but I suggest we still need to make encode heartbeat to no-op, what do you think:
@deprecated protected void encodeHeartbeatData(ObjectOutput out, Object data) throws IOException { // no op since heartbeat_event is null }
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
CI still fail:
|
@chenyu2016 I revisit this particular issue today, and the null heartbeat issue should have been solved by #3734. But I also realize that encodeHeartbeatData and decodeHeartbeatData are in fact useless, therefore I submit a new pull request #4673 to address it. Pls. verify if it works for you. I will close this pull request for now, feel free to reopen if you have different opinion. |
What is the purpose of the change
repair protosubff heartbeat data is null causes connect close
Brief changelog
Verifying this change
Dubbo version: 2.7.1
Operating System version: mac
Java version: 1.8