You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by ta...@apache.org on 2018/06/05 03:27:03 UTC
[2/2] impala git commit: IMPALA-6947: Kudu tests flaky due to rpc
timeout
IMPALA-6947: Kudu tests flaky due to rpc timeout
Some Kudu tests occasionally fail due to hitting an rpc timeout when
running on a heavily loaded machine. For normal operation, having a
low timeout is good for noticing issues quickly, but for tests there's
no real reason we can't set this higher to avoid flakiness.
This patch adds a flag, -kudu_client_rpc_timeout_ms, disabled by
default. It also sets -kudu_client_rpc_timeout_ms to 60s for ASAN in
start-impala-cluster.py, higher than Kudu's default value of 10s.
Testing:
- Passed a full run of core tests on ASAN.
Change-Id: I8c4a2d87934cd4eb98509512f7060a596894ed53
Reviewed-on: http://gerrit.cloudera.org:8080/10466
Reviewed-by: Michael Brown <mi...@cloudera.com>
Reviewed-by: Michael Ho <kw...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>
Project: http://git-wip-us.apache.org/repos/asf/impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/impala/commit/f9ab03fd
Tree: http://git-wip-us.apache.org/repos/asf/impala/tree/f9ab03fd
Diff: http://git-wip-us.apache.org/repos/asf/impala/diff/f9ab03fd
Branch: refs/heads/master
Commit: f9ab03fd3548a2efba6a3931b3e0861afae1a55f
Parents: c9e8f2f
Author: Thomas Tauber-Marshall <tm...@cloudera.com>
Authored: Fri May 18 22:05:56 2018 +0000
Committer: Impala Public Jenkins <im...@cloudera.com>
Committed: Tue Jun 5 01:33:50 2018 +0000
----------------------------------------------------------------------
be/src/common/global-flags.cc | 7 +++++++
be/src/exec/kudu-util.cc | 7 ++++++-
bin/start-impala-cluster.py | 6 ++++++
3 files changed, 19 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/impala/blob/f9ab03fd/be/src/common/global-flags.cc
----------------------------------------------------------------------
diff --git a/be/src/common/global-flags.cc b/be/src/common/global-flags.cc
index 840ec09..6130510 100644
--- a/be/src/common/global-flags.cc
+++ b/be/src/common/global-flags.cc
@@ -159,6 +159,13 @@ DEFINE_int32(kudu_operation_timeout_ms, 3 * 60 * 1000, "Timeout (milliseconds) s
"all Kudu operations. This must be a positive value, and there is no way to disable "
"timeouts.");
+// Timeout (ms) for Kudu rpcs set in the BE on the KuduClient.
+DEFINE_int32(kudu_client_rpc_timeout_ms, 0, "(Advanced) Timeout (milliseconds) set for "
+ "individual Kudu client rpcs. An operation may consist of several rpcs, so this is "
+ "expected to be less than kudu_operation_timeout_ms. This must be a positive value "
+ "or it will be ignored and Kudu's default of 10s will be used. There is no way to "
+ "disable timeouts.");
+
DEFINE_int64(inc_stats_size_limit_bytes, 200 * (1LL<<20), "Maximum size of "
"incremental stats the catalog is allowed to serialize per table. "
"This limit is set as a safety check, to prevent the JVM from "
http://git-wip-us.apache.org/repos/asf/impala/blob/f9ab03fd/be/src/exec/kudu-util.cc
----------------------------------------------------------------------
diff --git a/be/src/exec/kudu-util.cc b/be/src/exec/kudu-util.cc
index 0538a61..dd959e6 100644
--- a/be/src/exec/kudu-util.cc
+++ b/be/src/exec/kudu-util.cc
@@ -24,6 +24,7 @@
#include <kudu/client/callbacks.h>
#include <kudu/client/schema.h>
#include <kudu/common/partial_row.h>
+#include <kudu/util/monotime.h>
#include "common/logging.h"
#include "common/names.h"
@@ -41,7 +42,7 @@ using kudu::client::KuduValue;
using DataType = kudu::client::KuduColumnSchema::DataType;
DECLARE_bool(disable_kudu);
-DECLARE_int32(kudu_operation_timeout_ms);
+DECLARE_int32(kudu_client_rpc_timeout_ms);
namespace impala {
@@ -69,6 +70,10 @@ Status CreateKuduClient(const vector<string>& master_addrs,
kudu::client::sp::shared_ptr<KuduClient>* client) {
kudu::client::KuduClientBuilder b;
for (const string& address: master_addrs) b.add_master_server_addr(address);
+ if (FLAGS_kudu_client_rpc_timeout_ms > 0) {
+ b.default_rpc_timeout(
+ kudu::MonoDelta::FromMilliseconds(FLAGS_kudu_client_rpc_timeout_ms));
+ }
KUDU_RETURN_IF_ERROR(b.Build(client), "Unable to create Kudu client");
return Status::OK();
}
http://git-wip-us.apache.org/repos/asf/impala/blob/f9ab03fd/bin/start-impala-cluster.py
----------------------------------------------------------------------
diff --git a/bin/start-impala-cluster.py b/bin/start-impala-cluster.py
index 1242ab9..6856594 100755
--- a/bin/start-impala-cluster.py
+++ b/bin/start-impala-cluster.py
@@ -27,6 +27,7 @@ from getpass import getuser
from time import sleep, time
from optparse import OptionParser, SUPPRESS_HELP
from testdata.common import cgroups
+from tests.common.environ import specific_build_type_timeout
KUDU_MASTER_HOSTS = os.getenv('KUDU_MASTER_HOSTS', '127.0.0.1')
DEFAULT_IMPALA_MAX_LOG_FILES = os.environ.get('IMPALA_MAX_LOG_FILES', 10)
@@ -110,6 +111,8 @@ CLUSTER_WAIT_TIMEOUT_IN_SECONDS = 240
# Kills have a timeout to prevent automated scripts from hanging indefinitely.
# It is set to a high value to avoid failing if processes are slow to shut down.
KILL_TIMEOUT_IN_SECONDS = 240
+# For build types like ASAN, modify the default Kudu rpc timeout.
+KUDU_RPC_TIMEOUT = specific_build_type_timeout(0, slow_build_timeout=60000)
def find_user_processes(binaries):
"""Returns an iterator over all processes owned by the current user with a matching
@@ -269,6 +272,9 @@ def start_impalad_instances(cluster_size, num_coordinators, use_exclusive_coordi
# Must be prepended, otherwise the java options interfere.
args = "-kudu_master_hosts %s %s" % (options.kudu_master_hosts, args)
+ if "kudu_client_rpc_timeout" not in args:
+ args = "-kudu_client_rpc_timeout_ms %s %s" % (KUDU_RPC_TIMEOUT, args)
+
if i >= num_coordinators:
args = "-is_coordinator=false %s" % (args)
elif use_exclusive_coordinators: