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 34b17db7b473d6729ac6c9cf139fcf410f18d941
Author: Riza Suminto <[email protected]>
AuthorDate: Thu Mar 6 08:34:29 2025 -0800

    IMPALA-12931: (Addendum) Slow test_no_hms_event_incremental_refresh
    
    test_no_hms_event_incremental_refresh_transactional_table still flaky
    even after adding statestore heartbeat wait. This patch increased wait
    time to 4x statestore heartbeat period.
    
    Testing:
    - Loop and pass the tests 10 times.
    
    Change-Id: I01f9bd3664237e3152ccd8f1cac4b226deb117d0
    Reviewed-on: http://gerrit.cloudera.org:8080/22590
    Reviewed-by: Jason Fehr <[email protected]>
    Reviewed-by: Csaba Ringhofer <[email protected]>
    Tested-by: Impala Public Jenkins <[email protected]>
---
 tests/custom_cluster/test_events_custom_configs.py | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/tests/custom_cluster/test_events_custom_configs.py 
b/tests/custom_cluster/test_events_custom_configs.py
index a162b95ba..c99e6384b 100644
--- a/tests/custom_cluster/test_events_custom_configs.py
+++ b/tests/custom_cluster/test_events_custom_configs.py
@@ -52,9 +52,10 @@ EVENT_SYNC_QUERY_OPTIONS = {
 }
 
 
-def wait_single_statestore_heartbeat():
+def wait_statestore_heartbeat(num_heartbeat=1):
   """Wait for state sync across impalads."""
-  sleep(STATESTORE_RPC_FREQUENCY_MS / 1000.0)
+  assert num_heartbeat > 0
+  sleep(STATESTORE_RPC_FREQUENCY_MS / 1000.0 * num_heartbeat)
 
 
 class TestEventProcessingCustomConfigsBase(CustomClusterTestSuite):
@@ -1266,11 +1267,11 @@ class 
TestEventProcessingCustomConfigs(TestEventProcessingCustomConfigsBase):
       part_create = " partitioned by (p int)" if partitioned else ""
       part_insert = " partition (p = 1)" if partitioned else ""
 
-      self.run_stmt_in_hive(
-          "create transactional table {} (i int){}".format(fq_tbl, 
part_create))
+      create_stmt = "create transactional table {} (i int){}".format(fq_tbl, 
part_create)
+      self.run_stmt_in_hive(create_stmt)
       EventProcessorUtils.wait_for_event_processing(self)
       # Wait for StatestoreD to propagate the update.
-      wait_single_statestore_heartbeat()
+      wait_statestore_heartbeat(num_heartbeat=4)
 
       # Load the table in Impala before INSERT
       self.client.execute("refresh " + fq_tbl)
@@ -1278,10 +1279,11 @@ class 
TestEventProcessingCustomConfigs(TestEventProcessingCustomConfigsBase):
           "insert into {}{} values (1),(2),(3)".format(fq_tbl, part_insert))
       EventProcessorUtils.wait_for_event_processing(self)
       # Wait for StatestoreD to propagate the update.
-      wait_single_statestore_heartbeat()
+      wait_statestore_heartbeat(num_heartbeat=4)
 
       results = self.client.execute("select i from " + fq_tbl)
-      assert results.data == ["1", "2", "3"]
+      assert results.data == ["1", "2", "3"], (
+        "ACID table is not updated. Create statement: {}").format(create_stmt)
 
   
@CustomClusterTestSuite.with_args(catalogd_args="--hms_event_polling_interval_s=5")
   def test_invalidate_better_create_event_id(self, unique_database):
@@ -1369,7 +1371,7 @@ class 
TestEventProcessingCustomConfigs(TestEventProcessingCustomConfigsBase):
     EventProcessorUtils.wait_for_event_processing(self)
 
     # Wait for StatestoreD to propagate the update.
-    wait_single_statestore_heartbeat()
+    wait_statestore_heartbeat()
 
     # Validate that relevant log lines are printed in Coordinator.
     # This should be instantaneous after statestore update received, but set 
explicit

Reply via email to