Fix: potential missing on_closed message on client-side#2525
Open
kaijchen wants to merge 2 commits intoapache:masterfrom
Open
Fix: potential missing on_closed message on client-side#2525kaijchen wants to merge 2 commits intoapache:masterfrom
kaijchen wants to merge 2 commits intoapache:masterfrom
Conversation
Contributor
|
之前UT有问题。最新master分支已修复,可以更新试试。 |
chenzhangyi
reviewed
Jan 31, 2024
| // Send rpc response over stream even if server side failed to create | ||
| // stream for some reason. | ||
| if(cntl->has_remote_stream()){ | ||
| if (stream_ptr) { |
Member
There was a problem hiding this comment.
能不能加一个注释说明下为什么SetConnected一定要在发消息之前设置吗?
如果这里有race的话,后面需要加一个barrier不?
Member
Author
Co-authored-by: Xin Liao <liaoxinbit@126.com>
Contributor
|
StreamingRpcTest.server_send_data_before_run_done 这个单测失败了,是不是和改动有关? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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: