[ 
https://issues.apache.org/jira/browse/IMPALA-13815?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17932742#comment-17932742
 ] 

ASF subversion and git services commented on IMPALA-13815:
----------------------------------------------------------

Commit ea989dfb283d1c80d96066f163d3f709adcf411d in impala's branch 
refs/heads/master from jasonmfehr
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=ea989dfb2 ]

IMPALA-13815: Fix Flaky Workload Management Tests

The CustomClusterTestSuite.wait_for_wm_init() function checks for two
specific log lines to be logged by the catalog. The first line is
logged when workload manangement initialization is complete. The
second line is when a catalog topic update has been assembled.

However, if workload management initialization is slow, then there
may not be a catalog topic update assembled after the initialization
completes. When this happens, an assertion fails despite the workload
management tables having been properly initialized and loaded by the
catalog.

This patch simplifies the CustomClusterTestSuite.wait_for_wm_init()
function so it waits until the catalogd logs it has completed
workload management initialization and then checks each coordinator's
local catalog cache for the workload management tables.

The following test suites passed locally and in an ASAN build. These
tests all call the 'wait_for_wm_init' function of
CustomClusterTestSuite.
  * tests/custom_cluster/test_query_live.py
  * tests/custom_cluster/test_query_log.py
  * tests/custom_cluster/test_workload_mgmt_init.py
  * tests/custom_cluster/test_workload_mgmt_sql_details.py

Change-Id: Ieb4c86fa79bb1df000b6241bdd31c7641d807c4f
Reviewed-on: http://gerrit.cloudera.org:8080/22570
Reviewed-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
Tested-by: Riza Suminto <riza.sumi...@cloudera.com>


> test_ignored_sqls_not_written failed failed in exhaustive-release-arm build
> ---------------------------------------------------------------------------
>
>                 Key: IMPALA-13815
>                 URL: https://issues.apache.org/jira/browse/IMPALA-13815
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Backend
>            Reporter: Riza Suminto
>            Assignee: Jason Fehr
>            Priority: Major
>              Labels: broken-build
>
> test_ignored_sqls_not_written failed failed in exhaustive-release-arm build 
> with following error.
> {noformat}
> Error Message
> test setup failure
> Stacktrace
> custom_cluster/test_query_log.py:59: in setup_method
>     self.wait_for_wm_init_complete()
> common/custom_cluster_test_suite.py:420: in wait_for_wm_init_complete
>     r'assembled\. Catalog version: (\d+)', timeout_s)
> common/impala_test_suite.py:1541: in assert_log_contains_multiline
>     "contents matching the regex '{}'".format(line_regex)
> E   AssertionError: did not find any logfile contents matching the regex 
> 'Completed workload management initialization.*?A catalog update with \d+ 
> entries is assembled\. Catalog version: (\d+)'{noformat}
> There is also different failure in asf-master-core build.
> {noformat}
> custom_cluster.test_query_log.TestQueryLogTableAll.test_ignored_sqls_not_written[protocol:
>  beeswax | table_format: text/none | exec_option: {'test_replan': 1, 
> 'batch_size': 0, 'num_nodes': 0, 'disable_codegen_rows_threshold': 0, 
> 'disable_codegen': False, 'abort_on_error': 1, 
> 'exec_single_node_rows_threshold': 0}]
> Error Message
> AssertionError: query not found in completed queries table assert 0 == 1  +  
> where 0 = len([])  +    where [] = 
> <tests.beeswax.impala_beeswax.ImpalaBeeswaxResult object at 
> 0x7ff121bf8350>.data
> Stacktrace
> custom_cluster/test_query_log.py:996: in test_ignored_sqls_not_written
>     assert len(sql_results.data) == 1, "query not found in completed queries 
> table"
> E   AssertionError: query not found in completed queries table
> E   assert 0 == 1
> E    +  where 0 = len([])
> E    +    where [] = <tests.beeswax.impala_beeswax.ImpalaBeeswaxResult object 
> at 0x7ff121bf8350>.data
> {noformat}
> And,
> {noformat}
> custom_cluster.test_query_log.TestQueryLogTableAll.test_ignored_sqls_not_written[protocol:
>  hs2 | table_format: text/none | exec_option: {'test_replan': 1, 
> 'batch_size': 0, 'num_nodes': 0, 'disable_codegen_rows_threshold': 0, 
> 'disable_codegen': False, 'abort_on_error': 1, 
> 'exec_single_node_rows_threshold': 0}]
> Error Message
> AssertionError: query not found in completed queries table assert 0 == 1  +  
> where 0 = len([])  +    where [] = 
> <tests.common.impala_connection.ImpylaHS2ResultSet object at 
> 0x7ff121aada90>.data
> Stacktrace
> custom_cluster/test_query_log.py:996: in test_ignored_sqls_not_written
>     assert len(sql_results.data) == 1, "query not found in completed queries 
> table"
> E   AssertionError: query not found in completed queries table
> E   assert 0 == 1
> E    +  where 0 = len([])
> E    +    where [] = <tests.common.impala_connection.ImpylaHS2ResultSet 
> object at 0x7ff121aada90>.data
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscr...@impala.apache.org
For additional commands, e-mail: issues-all-h...@impala.apache.org

Reply via email to