impala-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From k...@apache.org
Subject impala git commit: IMPALA-5557: Disable rpc_default_keepalive_time_ms
Date Tue, 02 Jan 2018 22:38:38 GMT
Repository: impala
Updated Branches:
  refs/heads/master 4a45c829b -> a550b5b56


IMPALA-5557: Disable rpc_default_keepalive_time_ms

This change makes sure backend connections with KRPC are always
kept alive by disabling the idle connection detection logic.

Idle connections all tend to be closed and re-opened around the
same time, which may easily lead to negotiation timeouts. Until
KUDU-279 is fixed, closing idle connections is also racy and leads
to query failures.

This disablement was validated with Kudu's rpc-test.

Change-Id: I0871dd9c9bbe455466b9b2d2a2bbedec79cf0775
Reviewed-on: http://gerrit.cloudera.org:8080/8910
Reviewed-by: Michael Ho <kwho@cloudera.com>
Reviewed-by: Sailesh Mukil <sailesh@cloudera.com>
Tested-by: Impala Public Jenkins


Project: http://git-wip-us.apache.org/repos/asf/impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/impala/commit/a550b5b5
Tree: http://git-wip-us.apache.org/repos/asf/impala/tree/a550b5b5
Diff: http://git-wip-us.apache.org/repos/asf/impala/diff/a550b5b5

Branch: refs/heads/master
Commit: a550b5b56063eab6dafc2863c4dccd1455db6606
Parents: 4a45c82
Author: Michael Ho <kwho@cloudera.com>
Authored: Thu Dec 21 18:06:41 2017 -0800
Committer: Impala Public Jenkins <impala-public-jenkins@gerrit.cloudera.org>
Committed: Tue Jan 2 22:25:39 2018 +0000

----------------------------------------------------------------------
 be/src/rpc/rpc-mgr.cc | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/impala/blob/a550b5b5/be/src/rpc/rpc-mgr.cc
----------------------------------------------------------------------
diff --git a/be/src/rpc/rpc-mgr.cc b/be/src/rpc/rpc-mgr.cc
index c2546fe..91978bb 100644
--- a/be/src/rpc/rpc-mgr.cc
+++ b/be/src/rpc/rpc-mgr.cc
@@ -22,6 +22,7 @@
 #include "kudu/rpc/rpc_controller.h"
 #include "kudu/rpc/rpc_introspection.pb.h"
 #include "kudu/rpc/service_if.h"
+#include "kudu/util/monotime.h"
 #include "kudu/util/net/net_util.h"
 #include "util/auth-util.h"
 #include "util/cpu-info.h"
@@ -31,6 +32,7 @@
 
 using kudu::HostPort;
 using kudu::MetricEntity;
+using kudu::MonoDelta;
 using kudu::rpc::AcceptorPool;
 using kudu::rpc::MessengerBuilder;
 using kudu::rpc::Messenger;
@@ -60,6 +62,12 @@ Status RpcMgr::Init() {
       FLAGS_num_reactor_threads > 0 ? FLAGS_num_reactor_threads : CpuInfo::num_cores();
   bld.set_num_reactors(num_reactor_threads).set_metric_entity(entity);
 
+  // Disable idle connection detection by setting keepalive_time to -1. Idle connections
+  // tend to be closed and re-opened around the same time, which may lead to negotiation
+  // timeout. Please see IMPALA-5557 for details. Until KUDU-279 is fixed, closing idle
+  // connections is also racy and leads to query failures.
+  bld.set_connection_keepalive_time(MonoDelta::FromMilliseconds(-1));
+
   if (IsKerberosEnabled()) {
     string internal_principal;
     RETURN_IF_ERROR(GetInternalKerberosPrincipal(&internal_principal));


Mime
View raw message