Repository: impala
Updated Branches:
  refs/heads/master 02ee2d1c5 -> 2e9f5c90e

IMPALA-7023: Wait for fragments to finish for

The arrangement of tests in changed with
IMPALA-7010, splitting out the memory limit tests into
test_insert_mem_limit(). On exhaustive, the combination
of test dimensions means test_insert_mem_limit() executes
11 different combinations. Each of these statements can
use a large amount of memory and this is not cleaned
up immediately. This has been causing
test_insert_overwrite(), which immediately follows
test_insert_mem_limit(), to hit the process memory limit.

This changes test_insert_mem_limit() to make it wait
for its fragments to finish.

Change-Id: I5642e9cb32dd02afd74dde7e0d3b31bddbee3ccd
Reviewed-by: Philip Zeyliger <>
Tested-by: Impala Public Jenkins <>


Branch: refs/heads/master
Commit: 1e6544f7da1d756b437d8b0f12a6446f10f1f836
Parents: 02ee2d1
Author: Joe McDonnell <>
Authored: Mon May 14 22:31:21 2018 -0700
Committer: Impala Public Jenkins <>
Committed: Wed May 16 23:33:57 2018 +0000

 tests/query_test/ | 8 ++++++++
 1 file changed, 8 insertions(+)
diff --git a/tests/query_test/ b/tests/query_test/
index 2307b76..88aafb2 100644
--- a/tests/query_test/
+++ b/tests/query_test/
@@ -20,6 +20,7 @@
 import pytest
 from testdata.common import widetable
+from tests.common.impala_cluster import ImpalaCluster
 from tests.common.impala_test_suite import ImpalaTestSuite
 from tests.common.skip import SkipIfLocal, SkipIfNotHdfsMinicluster
 from tests.common.test_dimensions import (
@@ -31,6 +32,7 @@ from tests.common.test_result_verifier import (
 from tests.common.test_vector import ImpalaTestDimension
+from tests.verifiers.metric_verifier import MetricVerifier
 PARQUET_CODECS = ['none', 'snappy', 'gzip']
@@ -125,6 +127,12 @@ class TestInsertQueries(ImpalaTestSuite):
     self.run_test_case('QueryTest/insert-mem-limit', vector,
         multiple_impalad=vector.get_value('exec_option')['sync_ddl'] == 1)
+    # IMPALA-7023: These queries can linger and use up memory, causing 
+    # tests to hit memory limits. Wait for some time to allow the query to
+    # be reclaimed.
+    verifiers = [ MetricVerifier(i.service) for i in ImpalaCluster().impalads ]
+    for v in verifiers:
+      v.wait_for_metric("impala-server.num-fragments-in-flight", 0, timeout=60)
   def test_insert_overwrite(self, vector):

Reply via email to