You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ap...@apache.org on 2020/06/18 15:23:48 UTC

[arrow] branch master updated: ARROW-9168: [C++][Flight] Don't share TCP connection among clients

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

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


The following commit(s) were added to refs/heads/master by this push:
     new d08af2f  ARROW-9168: [C++][Flight] Don't share TCP connection among clients
d08af2f is described below

commit d08af2f8b7dbed191e9eba3f1f6ca82e282fcd31
Author: Yibo Cai <cy...@gmail.com>
AuthorDate: Thu Jun 18 17:23:31 2020 +0200

    ARROW-9168: [C++][Flight] Don't share TCP connection among clients
    
    Flight benchmark performs worse when working threads increases. It can
    be improved by setting gRPC option GRPC_ARG_USE_LOCAL_SUBCHANNEL_POOL
    to make each client creating its own TCP connection to server, without
    sharing one connection.
    
    Closes #7476 from cyb70289/flight
    
    Authored-by: Yibo Cai <cy...@gmail.com>
    Signed-off-by: Antoine Pitrou <an...@python.org>
---
 cpp/src/arrow/flight/client.cc | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/cpp/src/arrow/flight/client.cc b/cpp/src/arrow/flight/client.cc
index c228f71..8f1925a 100644
--- a/cpp/src/arrow/flight/client.cc
+++ b/cpp/src/arrow/flight/client.cc
@@ -858,6 +858,9 @@ class FlightClient::FlightClientImpl {
     args.SetInt(GRPC_ARG_INITIAL_RECONNECT_BACKOFF_MS, 100);
     // Receive messages of any size
     args.SetMaxReceiveMessageSize(-1);
+    // Setting this arg enables each client to open it's own TCP connection to server,
+    // not sharing one single connection, which becomes bottleneck under high load.
+    args.SetInt(GRPC_ARG_USE_LOCAL_SUBCHANNEL_POOL, 1);
 
     if (options.override_hostname != "") {
       args.SetSslTargetNameOverride(options.override_hostname);