brpc icon indicating copy to clipboard operation
brpc copied to clipboard

fix bug: switch between stream_rpc and baidu_std

Open howarlii opened this issue 1 year ago • 2 comments

What problem does this PR solve?

Issue Number: https://github.com/apache/brpc/issues/2677

Problem Summary: under baidu_std, server can not parse message when normal PRC and stream RPC arrive simultaneously

What is changed and the side effects?

Changed: switch between baidu_std and stream_rpc in InputMessenger::CutInputMessage

Side effects:

  • Performance effects(性能影响): Little or none

  • Breaking backward compatibility(向后兼容性): no


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.(请遵循贡献者准则).

howarlii avatar Jul 03 '24 11:07 howarlii

UT failed:

brpc_streaming_rpc_unittest.cpp:254: Failure
Expected equality of these values:
  0
  brpc::StreamWrite(request_stream, out)
    Which is: 11

wwbmmm avatar Jul 04 '24 03:07 wwbmmm

这个似乎是UT的概率fail问题,main上的UT也是fail的

howarlii avatar Jul 05 '24 02:07 howarlii

LGTM

wwbmmm avatar Jul 06 '24 07:07 wwbmmm