You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by ja...@apache.org on 2026/04/27 16:07:26 UTC
(impala) 01/02: IMPALA-14919: Deflake TestSelfRenameEvent.test_self_rename_event
This is an automated email from the ASF dual-hosted git repository.
asf-gitbox-commits pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git
commit 77be2ecfd8edf6533a100f0170126cf0d155bf25
Author: stiga-huang <hu...@gmail.com>
AuthorDate: Fri Apr 24 13:51:43 2026 +0800
IMPALA-14919: Deflake TestSelfRenameEvent.test_self_rename_event
The test pauses event-processor after executing an ALTER TABLE RENAME
statement, assuming the event will be processed later after that. That's
flaky since the event could actually be processed before the pause
command. Then the first fetch on 'events-skipped' metric happens too
late, e.g., events_skipped_before already counts the first ALTER_TABLE
event.
This patch fixes the issue by fetching the 'events-skipped' metric
before executing the first ALTER TABLE RENAME statement. This ensures
the two ALTER events are processed after that.
Tests:
Ran the test locally 60 times.
Change-Id: I9a5f3573cce4329e2ff35eaaf46586a65b9eb461
Reviewed-on: http://gerrit.cloudera.org:8080/24233
Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
tests/metadata/test_event_processing.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/metadata/test_event_processing.py b/tests/metadata/test_event_processing.py
index 892b6b2dd..4b71da7af 100644
--- a/tests/metadata/test_event_processing.py
+++ b/tests/metadata/test_event_processing.py
@@ -771,6 +771,7 @@ class TestSelfRenameEvent(ImpalaTestSuite):
self.execute_query("create table {}.tbl_a(i int)".format(unique_database))
# Wait until the CREATE_DATABASE and CREATE_TABLE events are skipped.
EventProcessorUtils.wait_for_event_processing(self)
+ events_skipped_before = EventProcessorUtils.get_int_metric('events-skipped', 0)
self.execute_query(
"alter table {0}.tbl_a rename to {0}.tbl_b".format(unique_database))
self.execute_query(":event_processor('pause')")
@@ -795,8 +796,7 @@ class TestSelfRenameEvent(ImpalaTestSuite):
alter_client.wait_for_finished_timeout(alter_handle, timeout=10)
alter_client.close_query(alter_handle)
- # Resume event processing. The first ALTER_TABLE RENAME events should be skipped.
- events_skipped_before = EventProcessorUtils.get_int_metric('events-skipped', 0)
+ # Resume event processing. The ALTER_TABLE RENAME events should be skipped.
self.execute_query(":event_processor('start')")
EventProcessorUtils.wait_for_event_processing(self)
events_skipped_after = EventProcessorUtils.get_int_metric('events-skipped', 0)