brpc icon indicating copy to clipboard operation
brpc copied to clipboard

Fix: potential missing on_closed message on client-side

Open kaijchen opened this issue 1 year ago • 2 comments

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.

https://github.com/apache/doris/pull/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:

  • Please make sure your changes are compilable(请确保你的更改可以通过编译).
  • When providing us with a new feature, it is best to add related tests(如果你向我们增加一个新的功能, 请添加相关测试).
  • Please follow Contributor Covenant Code of Conduct.(请遵循贡献者准则).

kaijchen avatar Jan 28 '24 12:01 kaijchen

之前UT有问题。最新master分支已修复,可以更新试试。

chenBright avatar Jan 31 '24 06:01 chenBright

StreamingRpcTest.server_send_data_before_run_done 这个单测失败了,是不是和改动有关?

wwbmmm avatar Apr 01 '24 02:04 wwbmmm