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 4:

(7 comments)

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:       for (Map.Entry<String, DbProcessor> entry : 
dbProcessors_.entrySet()) {
nit: we don't use the keys here so we can iterate dbProcessors_.values() 
directly.


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;
Should we add a warning log for this?


http://gerrit.cloudera.org:8080/#/c/24975/4/fe/src/main/java/org/apache/impala/catalog/events/EventExecutorWaiter.java@88
PS4, Line 88: the wait has elapsed
The javadoc of Object.wait() mentions that

> A thread can also wake up without being notified, interrupted, or timing out, 
> a so-called spurious wakeup. While this will rarely occur in practice, 
> applications must guard against it by testing for the condition that should 
> have caused the thread to be awakened, and continuing to wait if the 
> condition is not satisfied.

Maybe update this comment and the javadoc of this method to mention that a 
positive timeout is a best-effort upper bound (callers must tolerate early 
returns).


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:
nit: remove blank line and empty @return line


http://gerrit.cloudera.org:8080/#/c/24975/4/fe/src/main/java/org/apache/impala/catalog/events/RenameTableBarrierEvent.java@122
PS4, Line 122:
nit: remove blank line and empty @return line


http://gerrit.cloudera.org:8080/#/c/24975/4/fe/src/main/java/org/apache/impala/catalog/events/RenameTableBarrierEvent.java@129
PS4, Line 129:      * @param eventType
             :      * @param skipped
nit: remove these or add descriptions


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?

1. An event fails to process for table T. It stays in the corresponding 
TableProcessor.events_ and this executor parks on await(0).
2. User manually runs :event_processor('start') or :event_processor('start', 
<fromEventId>).

Result: the parked executors with their stale queued events stay blocked on 
await(0). If fromEventId skips past those event ids, they are never 
re-dispatched, so they sit unprocessed until some unrelated future event for 
table T happens to signal that executor.

Invoking signal() in EventExecutorService.makeActive()/start() for all db/table 
executors seems a fix for this.



--
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: 4
Gerrit-Owner: Anonymous Coward <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Quanlong Huang <[email protected]>
Gerrit-Comment-Date: Sat, 10 Oct 2026 09:42:07 +0000
Gerrit-HasComments: Yes

Reply via email to