Michael Smith has posted comments on this change. ( http://gerrit.cloudera.org:8080/21803 )
Change subject: IMPALA-915: Support cancel queries in frontend ...................................................................... Patch Set 46: (1 comment) http://gerrit.cloudera.org:8080/#/c/21803/43/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/43/fe/src/main/java/org/apache/impala/service/Canceller.java@44 PS43, Line 44: // Registers threads by their query ID so the threads can be interrupted on : // cancellation. : private static ConcurrentHashMap<TUniqueId, Thread> : queryThreads_ = new ConcurrentHashMap<>(); : // Registers that the specified thread has been cancelled and should clean up. : private static Set<Thread> cancelledThreads_ = ConcurrentHashMap.newKeySet(); > It's already a singleton. Synchronizing unregister/cancel would simplify th That does simplify the logic. The trade-off is potential concurrency. But these should be very fast operations (updating 1 or 2 hash maps) that are relatively infrequent (a couple times per query). I'll push an update along these lines. -- 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: 46 Gerrit-Owner: Michael Smith <michael.sm...@cloudera.com> Gerrit-Reviewer: Andrew Sherman <asher...@cloudera.com> Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com> Gerrit-Reviewer: Jason Fehr <jf...@cloudera.com> Gerrit-Reviewer: Joe McDonnell <joemcdonn...@cloudera.com> Gerrit-Reviewer: Michael Smith <michael.sm...@cloudera.com> Gerrit-Reviewer: Quanlong Huang <huangquanl...@gmail.com> Gerrit-Reviewer: Riza Suminto <riza.sumi...@cloudera.com> Gerrit-Comment-Date: Fri, 13 Jun 2025 22:22:05 +0000 Gerrit-HasComments: Yes