You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by mi...@apache.org on 2026/03/27 15:46:07 UTC
(impala) branch master updated: IMPALA-12715: deflake test_allow_metadata_update_local_catalog
This is an automated email from the ASF dual-hosted git repository.
michaelsmith pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git
The following commit(s) were added to refs/heads/master by this push:
new 957c398ad IMPALA-12715: deflake test_allow_metadata_update_local_catalog
957c398ad is described below
commit 957c398ad08930878b830a1eb1c1e6138a2a6929
Author: stiga-huang <hu...@gmail.com>
AuthorDate: Wed Mar 25 08:36:57 2026 +0800
IMPALA-12715: deflake test_allow_metadata_update_local_catalog
The test expects DESCRIBE on an unloaded table can load the table meta
in coordinator side. However, this can't be guaranteed in the local
catalog mode since catalog updates(invalidations) from statestore could
invalidate the cache (IMPALA-14856).
The test is flaky since DESCRIBE uses the table meta twice, one in
analyze phase (StmtMetadataLoader) and the other in execution
(Frontend.doDescribeTable()). If the statestore update arrives between
them, the second usage can load the table meta again so the cache item
exists. However, if the statestore update arrives after the second
usage, the cache item is removed so the test fails.
This patch deflakes the test by using REFRESH on the unloaded table to
trigger metadata loading in catalogd side. Run it with sync_ddl=true to
make sure coordinator processes the statestore update. Then run a
DESCRIBE to make sure the table meta is loaded in coordinator side.
Tests:
- ran the test locally 200 times.
- ran test_ranger.py
Change-Id: I538c30bf4d1439108bd1cd1cb64208281974c1f6
Reviewed-on: http://gerrit.cloudera.org:8080/24135
Tested-by: Impala Public Jenkins <im...@cloudera.com>
Reviewed-by: Michael Smith <mi...@cloudera.com>
---
tests/authorization/test_ranger.py | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/tests/authorization/test_ranger.py b/tests/authorization/test_ranger.py
index c5b4eb2e4..40208432c 100644
--- a/tests/authorization/test_ranger.py
+++ b/tests/authorization/test_ranger.py
@@ -1314,11 +1314,18 @@ class TestRanger(CustomClusterTestSuite):
table_loaded_log = "Loaded metadata for: functional.alltypestiny"
self.assert_catalogd_log_contains("INFO", table_loaded_log, expected_count=0)
- # Run a query to trigger metadata loading on the table
+ # Run REFRESH PARTITION to trigger metadata loading on the table. Use sync_ddl=true
+ # to make sure coordinators have processed the statestore update.
+ # TODO: use a single DESCRIBE when IMPALA-14856 is resolved.
self.execute_query_expect_success(
- non_admin_client, "describe functional.alltypestiny")
+ non_admin_client,
+ "refresh functional.alltypestiny partition(year=2009, month=1)",
+ query_options={'sync_ddl': True})
# Verify catalogd loads metadata of this table
self.assert_catalogd_log_contains("INFO", table_loaded_log, expected_count=1)
+ # Run DESCRIBE to make sure the metadata is loaded in coordinator side.
+ self.execute_query_expect_success(
+ non_admin_client, "describe functional.alltypestiny")
# INVALIDATE METADATA <table> is allowed since 'user' is detected as the owner.
self.execute_query_expect_success(