You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by yi...@apache.org on 2024/10/19 04:43:48 UTC

(doris) branch master updated: [bugfix](handshake) brpc handshake should not use light pool (#42115)

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 ffbdfe24db5 [bugfix](handshake) brpc handshake should not use light pool (#42115)
ffbdfe24db5 is described below

commit ffbdfe24db58f3da261c7205d6b864126d30c68d
Author: yiguolei <67...@qq.com>
AuthorDate: Sat Oct 19 12:43:39 2024 +0800

    [bugfix](handshake) brpc handshake should not use light pool (#42115)
    
    ## Proposed changes
    
    The light pool may be full. Handshake is used to check the connection
    state of brpc. Should not be interfered by the thread pool logic.
    
    ---------
    
    Co-authored-by: yiguolei <yi...@gmail.com>
---
 be/src/service/internal_service.cpp | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/be/src/service/internal_service.cpp b/be/src/service/internal_service.cpp
index 06dad46e90c..8dc4d7bb3c2 100644
--- a/be/src/service/internal_service.cpp
+++ b/be/src/service/internal_service.cpp
@@ -1669,17 +1669,13 @@ void PInternalService::reset_rpc_channel(google::protobuf::RpcController* contro
 void PInternalService::hand_shake(google::protobuf::RpcController* controller,
                                   const PHandShakeRequest* request, PHandShakeResponse* response,
                                   google::protobuf::Closure* done) {
-    bool ret = _light_work_pool.try_offer([request, response, done]() {
-        brpc::ClosureGuard closure_guard(done);
-        if (request->has_hello()) {
-            response->set_hello(request->hello());
-        }
-        response->mutable_status()->set_status_code(0);
-    });
-    if (!ret) {
-        offer_failed(response, done, _light_work_pool);
-        return;
+    // The light pool may be full. Handshake is used to check the connection state of brpc.
+    // Should not be interfered by the thread pool logic.
+    brpc::ClosureGuard closure_guard(done);
+    if (request->has_hello()) {
+        response->set_hello(request->hello());
     }
+    response->mutable_status()->set_status_code(0);
 }
 
 constexpr char HttpProtocol[] = "http://";


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org