chenbay commented on code in PR #1958:
URL: https://github.com/apache/incubator-brpc/pull/1958#discussion_r1004184007
##########
src/brpc/stream.h:
##########
@@ -49,16 +49,22 @@ 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)
{}
+ // stream max buffer size limit in [min_buf_size, max_buf_size]
+ // If |min_buf_size| <= 0, there's no min size limit of buf size
+ // default: 1048576 (1M)
+ size_t min_buf_size;
+
// The max size of unconsumed data allowed at remote side.
// If |max_buf_size| <= 0, there's no limit of buf size
// default: 2097152 (2M)
- int max_buf_size;
+ size_t max_buf_size;
Review Comment:
也行吧,按原来int的逻辑吧。
> 最好不要改已有的字段吧 而且注释里也写了 <= 0,说明可能是负数 我意思是用max_buf_size的地方判断一下是否>0再用
--
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]