[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 6: (8 comments) Thanks for the review, Quanlong. All comments are addressed in the latest patch set 5. Also, While testing, test_rename_table_hierarchical_one_db_and_two_table_threads failed intermittently. The new wakeup signal exposed an existing race in RenameTableBarrierEvent.updateStatus(): both pseudo-events could see the other as processed and both increment the skipped metric. Now only the pseudo create table event does the final bookkeeping (skipped metric and delete event log). And injectErrorIfNeeded() runs only after the create. http://gerrit.cloudera.org:8080/#/c/24975/4/fe/src/main/java/org/apache/impala/catalog/events/DbEventExecutor.java File fe/src/main/java/org/apache/impala/catalog/events/DbEventExecutor.java: http://gerrit.cloudera.org:8080/#/c/24975/4/fe/src/main/java/org/apache/impala/catalog/events/DbEventExecutor.java@807 PS4, Line 807: if (!eventProcessor_.canProcessEventInCurrentStatus()) break; > nit: we don't use the keys here so we can iterate dbProcessors_.values() di done http://gerrit.cloudera.org:8080/#/c/24975/4/fe/src/main/java/org/apache/impala/catalog/events/EventExecutorWaiter.java File fe/src/main/java/org/apache/impala/catalog/events/EventExecutorWaiter.java: http://gerrit.cloudera.org:8080/#/c/24975/4/fe/src/main/java/org/apache/impala/catalog/events/EventExecutorWaiter.java@85 PS4, Line 85: * @return False if the executor is stopped or the waiting thread is interrupted, and > Should we add a warning log for this? Done http://gerrit.cloudera.org:8080/#/c/24975/4/fe/src/main/java/org/apache/impala/catalog/events/EventExecutorWaiter.java@88 PS4, Line 88: nized boolean await( > The javadoc of Object.wait() mentions that Done http://gerrit.cloudera.org:8080/#/c/24975/4/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/4/fe/src/main/java/org/apache/impala/catalog/events/RenameTableBarrierEvent.java@113 PS4, Line 113: synchronized boolean isDropProcessed() { > nit: remove blank line and empty @return line Done http://gerrit.cloudera.org:8080/#/c/24975/4/fe/src/main/java/org/apache/impala/catalog/events/RenameTableBarrierEvent.java@122 PS4, Line 122: return createProcessed_; > nit: remove blank line and empty @return line Done http://gerrit.cloudera.org:8080/#/c/24975/4/fe/src/main/java/org/apache/impala/catalog/events/RenameTableBarrierEvent.java@129 PS4, Line 129: */ : synchronized void > nit: remove these or add descriptions Done. Added descriptions for the parameters. 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; > Will this be a problem in the following scenario? Thanks, good catch. I had assumed invalidate metadata was the only way to recover from ERROR/NEEDS_INVALIDATE. But :event_processor('pause') and :event_processor('start') are both accepted in these states, so the scenario is possible. Signalling the executors in makeActive()/start() alone wouldn't be enough, though. The stale events would then be processed and could overlap with the events re-fetched from the greatest synced event. With start(-1) or start(<fromEventId>), they would even be applied after the user asked to skip them. The same stale events also caused a related problem. :event_processor('pause') after a failure could block for up to an hour in pauseGracefully(). ensureEventsProcessedInHierarchicalMode() waits for the outstanding event count to reach 0. But the failed event and the events queued behind it never drains. Parked TableEventExecutor isn't signalled on pause, so it never retries. And even when the failed event is retried, a deterministic failure can again bring back the event processor to ERROR. So have fixed to discard events on failure. And start resumes and fetches the events depending on the starting point(i.e., start()/start(-1)/start(<fromEventId>)). No executor is left holding queued events, so nothing stays parked with stale work, and pauseGracefully() returns immediately after a failure. And in syncMetadataWithHierarchicalEventProcessing(), HMS event sync requests now fail if the status changes while it is waiting for sync to finish. 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") > Do we need to disable hierarchical event processing in these tests? If so, Done. All these tests exists with explicit "--enable_hierarchical_event_processing=true" as well right next to the corresponding tests. These tests were added before changing default value of enable_hierarchical_event_processing to true. Expected to run these tests with enable_hierarchical_event_processing false. After change of enable_hierarchical_event_processing default value to true, tests run both times with hep enabled. Updated commit message now. -- 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: Tue, 20 Oct 2026 06:38:50 +0000 Gerrit-HasComments: Yes
