chenbay commented on code in PR #1928:
URL: https://github.com/apache/incubator-brpc/pull/1928#discussion_r996664232
##########
src/brpc/stream.h:
##########
@@ -49,12 +49,18 @@ class StreamInputHandler {
struct StreamOptions {
StreamOptions()
- : max_buf_size(2 * 1024 * 1024)
+ : min_buf_size(1024 * 1024)
+ , max_buf_size(2 * 1024 * 1024)
, idle_timeout_ms(-1)
, messages_in_batch(128)
, handler(NULL)
{}
+ // The max size of unconsumed data allowed at remote side.
Review Comment:
socket里控制总的streams buffer size大小,防止_consumer_queue里链表占用太多内存。因为会通过反馈降低buffer
size大小,所以增加一个min_buf_size来和max_buf_size一起限定stream buffer size范围。
--
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]