This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new f2ebe65ea4 [enhancement](exchange) not use thread pool to handle 
exchange block (#23970)
f2ebe65ea4 is described below

commit f2ebe65ea467a414a1de26c1bdbd89aa48ab2dc8
Author: yiguolei <[email protected]>
AuthorDate: Thu Sep 7 19:40:48 2023 +0800

    [enhancement](exchange) not use thread pool to handle exchange block 
(#23970)
    
    Co-authored-by: yiguolei <[email protected]>
---
 be/src/service/internal_service.cpp | 18 ++++--------------
 1 file changed, 4 insertions(+), 14 deletions(-)

diff --git a/be/src/service/internal_service.cpp 
b/be/src/service/internal_service.cpp
index 87916ed4c4..1b534a0261 100644
--- a/be/src/service/internal_service.cpp
+++ b/be/src/service/internal_service.cpp
@@ -1100,20 +1100,10 @@ void 
PInternalServiceImpl::transmit_block(google::protobuf::RpcController* contr
     int64_t receive_time = GetCurrentTimeNanos();
     response->set_receive_time(receive_time);
 
-    if (!request->has_block() && config::brpc_light_work_pool_threads == -1) {
-        // under high concurrency, thread pool will have a lot of lock 
contention.
-        _transmit_block(controller, request, response, done, Status::OK());
-        return;
-    }
-
-    FifoThreadPool& pool = request->has_block() ? _heavy_work_pool : 
_light_work_pool;
-    bool ret = pool.try_offer([this, controller, request, response, done]() {
-        _transmit_block(controller, request, response, done, Status::OK());
-    });
-    if (!ret) {
-        offer_failed(response, done, pool);
-        return;
-    }
+    // under high concurrency, thread pool will have a lot of lock contention.
+    // May offer failed to the thread pool, so that we should avoid using 
thread
+    // pool here.
+    _transmit_block(controller, request, response, done, Status::OK());
 }
 
 void 
PInternalServiceImpl::transmit_block_by_http(google::protobuf::RpcController* 
controller,


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to