lorinlee commented on code in PR #2280:
URL: https://github.com/apache/brpc/pull/2280#discussion_r1233007764


##########
src/brpc/controller.cpp:
##########
@@ -1173,14 +1173,16 @@ void Controller::IssueRPC(int64_t start_realtime_us) {
     wopt.ignore_eovercrowded = has_flag(FLAGS_IGNORE_EOVERCROWDED);
     int rc;
     size_t packet_size = 0;
+    // For async RPC, write to socket in background bthread to avoid blocking 
current thread.
+    bool write_in_background = _done != nullptr;

Review Comment:
   
+1,这里每次都走KeepWrite的话,不确定是不是所有场景都是正向收益,最糟糕的场景如果batch不起来的话,每次Write都需要启动后台bthread来做,那每次Write都需要额外负担一个bthread创建+等待调度的时延开销,所以我觉得Options里让用户指定好一点,默认为false,有需要的场景单独设就好了



-- 
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]

Reply via email to