This is an automated email from the ASF dual-hosted git repository. stigahuang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/impala.git
commit 7ae19b069e6f2108b34757b052467706d1adbe16 Author: Riza Suminto <[email protected]> AuthorDate: Mon Mar 3 18:34:24 2025 -0800 IMPALA-13823: Clear existing entry of TMP_DIRS at cluster_setup Assertion was hit at CustomClusterTestSuite.make_tmp_dir() for attempting to create tmp dir that already have mapping in CustomClusterTestSuite.TMP_DIRS. It can happen if different custom cluster tests run declare the same tmp_dir_placeholders, and one of the earlier run fail to teardown properly, resulting in clear_tmp_dirs() not being called. This patch fix the issue by clearing existing TMP_DIRS entry without removing the underlying filesystem path. Along with it, a WARN log will be printed, saying about dirty entry in TMP_DIRS. Testing: - Manually comment clear_tmp_dirs() call in cluster_teardown() and run TestQueryLogTableBufferPool.test_select. Confirmed that all 4 of its test runs complete, the warning logs printed to logs/custom_cluster_tests/results/TEST-impala-custom-cluster.xml and the tmp dir stays in logs/custom_cluster_tests/. Change-Id: I3f528bb155eb3cf4dfa58a6a23feb438809556bc Reviewed-on: http://gerrit.cloudera.org:8080/22572 Reviewed-by: Impala Public Jenkins <[email protected]> Tested-by: Impala Public Jenkins <[email protected]> --- tests/common/custom_cluster_test_suite.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/common/custom_cluster_test_suite.py b/tests/common/custom_cluster_test_suite.py index 8819b8735..30cba724a 100644 --- a/tests/common/custom_cluster_test_suite.py +++ b/tests/common/custom_cluster_test_suite.py @@ -272,6 +272,12 @@ class CustomClusterTestSuite(ImpalaTestSuite): if TMP_DIR_PLACEHOLDERS in args: # Create all requested temporary dirs. for name in args[TMP_DIR_PLACEHOLDERS]: + if name in cls.TMP_DIRS: + LOG.warning("Tmp dir '{0}' referring to '{1}' not been cleanup. It will " + "be erased from TMP_DIRS map, but actual path might stay in " + "filesystem. Custom cluster test before this might have not " + "teardown cleanly.".format(name, cls.TMP_DIRS[name])) + del cls.TMP_DIRS[name] cls.make_tmp_dir(name) if args.get(IMPALAD_GRACEFUL_SHUTDOWN, False):
