-
Notifications
You must be signed in to change notification settings - Fork 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
Fix: potential missing on_closed message on client-side #2525
base: master
Are you sure you want to change the base?
Conversation
之前UT有问题。最新master分支已修复,可以更新试试。 |
@@ -247,6 +247,11 @@ void SendRpcResponse(int64_t correlation_id, | |||
// Send rpc response over stream even if server side failed to create | |||
// stream for some reason. | |||
if(cntl->has_remote_stream()){ | |||
if (stream_ptr) { |
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.
能不能加一个注释说明下为什么SetConnected一定要在发消息之前设置吗?
如果这里有race的话,后面需要加一个barrier不?
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.
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.
代码和注释更新了,请再看一下。
Co-authored-by: Xin Liao <liaoxinbit@126.com>
StreamingRpcTest.server_send_data_before_run_done 这个单测失败了,是不是和改动有关? |
What problem does this PR solve?
Issue Number:
Problem Summary:
We have met a problem in Apache Doris where a stream rpc client cannot receive any message (including
on_closed
) from stream server.apache/doris#30476
In certain cases, if the server-side stream is actively closing the stream.
The close frame is not sent to client-side due to connected is not set.
We should set connected before send stream data.
What is changed and the side effects?
Changed:
Side effects:
Performance effects(性能影响):
Breaking backward compatibility(向后兼容性):
Check List: