Quanlong Huang has posted comments on this change. ( http://gerrit.cloudera.org:8080/24975 )
Change subject: IMPALA-15451: Make hierarchical event executors event-driven ...................................................................... Patch Set 6: (7 comments) Thanks for the fixing the undefined behavior with hms event sync requests! http://gerrit.cloudera.org:8080/#/c/24975/6/fe/src/main/java/org/apache/impala/catalog/events/MetastoreEventsProcessor.java File fe/src/main/java/org/apache/impala/catalog/events/MetastoreEventsProcessor.java: http://gerrit.cloudera.org:8080/#/c/24975/6/fe/src/main/java/org/apache/impala/catalog/events/MetastoreEventsProcessor.java@1428 PS6, Line 1428: lastSyncedEventId_.set(getGreatestSyncedEventId()); nit: It's worth mentioning here that lastSycnedEventId is the last dispatched event id in hierarchical event processing http://gerrit.cloudera.org:8080/#/c/24975/6/fe/src/main/java/org/apache/impala/catalog/events/MetastoreEventsProcessor.java@1429 PS6, Line 1429: lastSyncedEventTimeSecs_.set(getGreatestSyncedEventTime()); Is it possible that another TableExecutor thread updates the processedLog_ of EventExecutorService concurrently after L1428 then this event time is inconsistent with the above event id? Maybe getting the pair of <eventId, eventTime> at once is more robust. eventExecutorService_.clear() also uses its processedLog_. If they could be inconsistent, we can let clear() returns the pair of greatest synced event id + time and set them to lastSyncedEventId_ and lastSyncedEventTimeSecs_ http://gerrit.cloudera.org:8080/#/c/24975/6/fe/src/main/java/org/apache/impala/catalog/events/RenameTableBarrierEvent.java File fe/src/main/java/org/apache/impala/catalog/events/RenameTableBarrierEvent.java: http://gerrit.cloudera.org:8080/#/c/24975/6/fe/src/main/java/org/apache/impala/catalog/events/RenameTableBarrierEvent.java@187 PS6, Line 187: Preconditions.checkState(state_.isDropProcessed()); nit: let's avoid using Preconditions checks without error messages, e.g. Preconditions.checkState(state_.isDropProcessed(), "Pseudo DROP event should have been processed"); http://gerrit.cloudera.org:8080/#/c/24975/4/fe/src/main/java/org/apache/impala/catalog/events/TableEventExecutor.java File fe/src/main/java/org/apache/impala/catalog/events/TableEventExecutor.java: http://gerrit.cloudera.org:8080/#/c/24975/4/fe/src/main/java/org/apache/impala/catalog/events/TableEventExecutor.java@473 PS4, Line 473: if (!waiter_.await(0)) break; > Thanks, good catch. I had assumed invalidate metadata was the only way to r Done http://gerrit.cloudera.org:8080/#/c/24975/6/fe/src/main/java/org/apache/impala/catalog/events/TableEventExecutor.java File fe/src/main/java/org/apache/impala/catalog/events/TableEventExecutor.java: http://gerrit.cloudera.org:8080/#/c/24975/6/fe/src/main/java/org/apache/impala/catalog/events/TableEventExecutor.java@373 PS6, Line 373: // Throwing EventProcessException updates the event processor status to ERROR or : // NEEDS_INVALIDATE, which clears EventExecutorService and thereby removes all : // DbProcessors and TableProcessors. Global invalidate metadata is triggered : // without user intervention iff : // invalidate_global_metadata_on_event_processing_failure flag is true. : // Otherwise, user has to issue invalidate metadata or start event processor. nit: this appears 3 times. How about moving it to the class comment of EventProcessException? http://gerrit.cloudera.org:8080/#/c/24975/6/tests/custom_cluster/test_event_processing_error.py File tests/custom_cluster/test_event_processing_error.py: http://gerrit.cloudera.org:8080/#/c/24975/6/tests/custom_cluster/test_event_processing_error.py@61 PS6, Line 61: self.run_stmt_in_hive("insert into {}.t1 values (1),(2),(3)".format(unique_database)) Can we run this 3 times so there are other INSERT events in the queue? Then after L78 they should all be discarded. http://gerrit.cloudera.org:8080/#/c/24975/4/tests/custom_cluster/test_event_processing_perf.py File tests/custom_cluster/test_event_processing_perf.py: http://gerrit.cloudera.org:8080/#/c/24975/4/tests/custom_cluster/test_event_processing_perf.py@82 PS4, Line 82: "--enable_hierarchical_event_processing=false") > Done. All these tests exists with explicit "--enable_hierarchical_event_pro Ack -- To view, visit http://gerrit.cloudera.org:8080/24975 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I97107e99ead7907023a936d0017f33fcdba23185 Gerrit-Change-Number: 24975 Gerrit-PatchSet: 6 Gerrit-Owner: Anonymous Coward <[email protected]> Gerrit-Reviewer: Anonymous Coward <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Quanlong Huang <[email protected]> Gerrit-Comment-Date: Fri, 23 Oct 2026 06:56:06 +0000 Gerrit-HasComments: Yes
