[email protected] has posted comments on this change. ( http://gerrit.cloudera.org:8080/24975 )
Change subject: IMPALA-15451: Make hierarchical event executors event-driven ...................................................................... Patch Set 8: (5 comments) 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: // synced event retained by clear(). It is set after clear(), since the processed > nit: It's worth mentioning here that lastSycnedEventId is the last dispatch Done http://gerrit.cloudera.org:8080/#/c/24975/6/fe/src/main/java/org/apache/impala/catalog/events/MetastoreEventsProcessor.java@1429 PS6, Line 1429: // log cannot change once the executors are cleared while this lock is held. So the > Is it possible that another TableExecutor thread updates the processedLog_ Yes. The two getters take the EventExecutorService lock separately, and executor threads can advance the greatest synced event between them and before clear(). So the id and time could come from different events, and clear() could retain a later event than the one lastSyncedEventId_ was moved back to. So, moved the update after clear() instead. Once clear() returns, the processed log only has the retained entry, and it cannot change while updateStatusOnFailure() holds this lock. While looking at this, found that the last dispatched event id check in getSyncInterruptedError() could not reliably detect discarded events. So I replaced it with a clear count in EventExecutorService, incremented in clear() and shutdown(). The sync request captures it under this lock before its isProcessed() checks, and fails if it changes. Added test_hms_event_sync_fails_upon_catalog_reset for the reset case. 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. 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: throw new EventProcessException(event.getEvent(), e); : } : } : } : } : > nit: this appears 3 times. How about moving it to the class comment of Even Done 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: # Pause the event processor so that all the INSERT events are fetched in a batch and > Can we run this 3 times so there are other INSERT events in the queue? Then Done -- 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: 8 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, 30 Oct 2026 20:17:18 +0000 Gerrit-HasComments: Yes
