jenrryyou commented on PR #3215:
URL: https://github.com/apache/brpc/pull/3215#issuecomment-4003505399
> Can you add some unit test to verify this scenario?
•
新增用例:test/brpc_streaming_rpc_unittest.cpp(StreamingRpcTest.batch_create_stream_feedback_race)
• 核心思路:客户端批量创建 2 条 request stream,刻意阻塞 extra stream 的 SetConnected()(锁住其
_connect_mutex),让 extra stream 先 Consume() 到 64B 数据后再放开 SetConnected();修复后
SetConnected() 会基于 _atomic_local_consumed 立刻补发首个
FEEDBACK(consumed_size=64),从而使服务端 extra stream的第二次 StreamWrite(1B) 不再长期
EAGAIN,避免错误反压。如果没有这个修复,这个单测会直接因为错误反压而hang住。
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]