apache / brpc

brpc is an Industrial-grade RPC framework using C++ Language, which is often used in high performance system such as Search, Storage, Machine learning, Advertisement, Recommendation etc. "brpc" means "better RPC".
https://brpc.apache.org
Apache License 2.0
16.04k stars 3.92k forks source link

fix bug: switch between stream_rpc and baidu_std #2678

Closed howarle closed 1 day ago

howarle commented 4 days ago

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:


Check List:

wwbmmm commented 4 days ago

UT failed:

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

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

wwbmmm commented 2 days ago

LGTM