Jackie-Jiang commented on code in PR #16445:
URL: https://github.com/apache/pinot/pull/16445#discussion_r2274562824


##########
pinot-core/src/main/java/org/apache/pinot/core/accounting/PerQueryCPUMemAccountantFactory.java:
##########
@@ -148,7 +159,7 @@ protected 
PerQueryCPUMemResourceUsageAccountant(PinotConfiguration config, boole
       _inactiveQuery = inactiveQuery;
       _instanceId = instanceId;
       _instanceType = instanceType;
-      _cancelSentQueries = new HashSet<>();
+      _cancelSentQueries = ConcurrentHashMap.newKeySet();

Review Comment:
   This constructor is used in test only. The one used in production is not 
modified



##########
pinot-core/src/main/java/org/apache/pinot/core/accounting/PerQueryCPUMemAccountantFactory.java:
##########
@@ -759,6 +784,11 @@ public void runOnce() {
           reapFinishedTasks();
           if (_triggeringLevel.ordinal() > TriggeringLevel.Normal.ordinal()) {
             _aggregatedUsagePerActiveQuery = getQueryResourcesImpl();
+            
_maxHeapUsageQuery.set(_aggregatedUsagePerActiveQuery.values().stream()

Review Comment:
   Should we set this only at or above `HeapMemoryCritical` leve?



##########
pinot-core/src/main/java/org/apache/pinot/core/accounting/PerQueryCPUMemAccountantFactory.java:
##########
@@ -860,19 +890,37 @@ void reschedule() {
       void killAllQueries() {
         QueryMonitorConfig config = _queryMonitorConfig.get();
 
-        if (config.isOomKillQueryEnabled()) {
+        if (config.isOomKillQueryEnabled() && !config.isThreadSelfTerminate()) 
{

Review Comment:
   (MAJOR) Without interrupt, query might block on certain operations, such as 
polling a blocking queue. We probably need to do both interrupt and self 
terminate. How do we verify the current approach is working or not?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to