impala-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [3/3] incubator-impala git commit: IMPALA-3336: qgen: do not randomly generate query options (workaround)
Date Fri, 22 Jul 2016 18:03:39 GMT
IMPALA-3336: qgen: do not randomly generate query options (workaround)

Disabling random query options seems to lessen the effects of
IMPALA-3336. Since much of the memory for IMPALA-3336 is tied up in the
psycopg2 cursor, and these query options are for Impala, there must be
something going on in the query execution path. One theory is that so
many random values for these query options don't make sense, and more
queries are rejected, but meanwhile they continue to run against
Postgres. It's possible the Postgres threads are not cleaning up.

I haven't been able to dive into that, but let's disable this for now.
We're able to get coverage without it. Moreover, I think more care needs
to be given to the values chosen for these query options.

Change-Id: If9c10e98f3be19739e223e89ffd79880e4c31de2
Tested-by: Michael Brown <>
Reviewed-by: David Knupp <>


Branch: refs/heads/master
Commit: 72e3c147e9329b472667c1fa0baeb7c4160e927c
Parents: e2a7038
Author: Michael Brown <>
Authored: Wed Jul 20 16:39:26 2016 -0700
Committer: Tim Armstrong <>
Committed: Fri Jul 22 11:03:33 2016 -0700

 tests/comparison/ | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/tests/comparison/ b/tests/comparison/
index ed419b9..0ff0fee 100755
--- a/tests/comparison/
+++ b/tests/comparison/
@@ -230,6 +230,10 @@ class QueryResultComparator(object):
 class QueryExecutor(object):
   '''Concurrently executes queries'''
+  # XXX: Set to false while IMPALA-3336 is a problem. Disabling random query options
+  # seems to reduce IMPALA-3336 occurances.
   # If the number of rows * cols is greater than this val, then the comparison will
   # be aborted. Raising this value also raises the risk of python being OOM killed. At
   # 10M python would get OOM killed occasionally even on a physical machine with 32GB
@@ -271,7 +275,7 @@ class QueryExecutor(object):
     # "CREATE VIEW <name> AS ...", this will be the value of "<name>".
     self._table_or_view_name = None
-  def set_impala_query_optons(self, cursor):
+  def set_impala_query_options(self, cursor):
     opts = """
         SET MEM_LIMIT={mem_limit};
         SET BATCH_SIZE={batch_size};
@@ -332,8 +336,8 @@ class QueryExecutor(object):
     query_threads = list()
     for sql_writer, cursor, log_file \
         in izip(self.sql_writers, self.cursors, self.query_logs):
-      if cursor.db_type == IMPALA:
-        self.set_impala_query_optons(cursor)
+      if self.ENABLE_RANDOM_QUERY_OPTIONS and cursor.db_type == IMPALA:
+        self.set_impala_query_options(cursor)
       query_thread = Thread(
           args=[query, cursor, sql_writer, log_file],

View raw message