Csaba Ringhofer has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/21803 )

Change subject: IMPALA-915: Support cancel queries in frontend
......................................................................


Patch Set 51:

(3 comments)

http://gerrit.cloudera.org:8080/#/c/21803/51/fe/src/main/java/org/apache/impala/service/Canceller.java
File fe/src/main/java/org/apache/impala/service/Canceller.java:

http://gerrit.cloudera.org:8080/#/c/21803/51/fe/src/main/java/org/apache/impala/service/Canceller.java@127
PS51, Line 127:   private synchronized boolean isCancelled() {
              :     return cancelledThreads_.contains(Thread.currentThread());
              :   }
> Re-reading, you mentioned adding it to queryThreads_. So the current thread
Yes, the current thread would check the thread local, while other threads could 
cancel it by looking up the AtomicBoolean in the map. This would mean that in 
most cases a query would need to take the global lock only twice (registration, 
unregistration).


http://gerrit.cloudera.org:8080/#/c/21803/51/tests/webserver/test_web_pages.py
File tests/webserver/test_web_pages.py:

http://gerrit.cloudera.org:8080/#/c/21803/51/tests/webserver/test_web_pages.py@1109
PS51, Line 1109:     wait_for_state(impalad, 'CREATED')
About timings: wait_for_state sleeps 0.5s, so my assumption is that in most 
cases the state will reach after 0.5s (2nd request from webui). Not sure if 
this matters much, but this likely means that the early cancellation points 
won't be tested.


http://gerrit.cloudera.org:8080/#/c/21803/51/tests/webserver/test_web_pages.py@1116
PS51, Line 1116: tames
typo



--
To view, visit http://gerrit.cloudera.org:8080/21803
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0d25d4c7fb0b8dcc7dad9510db1e8dca220eeb86
Gerrit-Change-Number: 21803
Gerrit-PatchSet: 51
Gerrit-Owner: Michael Smith <[email protected]>
Gerrit-Reviewer: Andrew Sherman <[email protected]>
Gerrit-Reviewer: Csaba Ringhofer <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Jason Fehr <[email protected]>
Gerrit-Reviewer: Joe McDonnell <[email protected]>
Gerrit-Reviewer: Michael Smith <[email protected]>
Gerrit-Reviewer: Quanlong Huang <[email protected]>
Gerrit-Reviewer: Riza Suminto <[email protected]>
Gerrit-Comment-Date: Fri, 20 Jun 2025 17:57:43 +0000
Gerrit-HasComments: Yes

Reply via email to