jasperjiaguo commented on code in PR #10373: URL: https://github.com/apache/pinot/pull/10373#discussion_r1125101463
########## pinot-core/src/main/java/org/apache/pinot/core/accounting/PerQueryCPUMemAccountantFactory.java: ########## @@ -724,14 +745,14 @@ void killAllQueries() { */ private void killMostExpensiveQuery() { if (!_aggregatedUsagePerActiveQuery.isEmpty() && _numQueriesKilledConsecutively >= _gcTriggerCount) { - System.gc(); _numQueriesKilledConsecutively = 0; + System.gc(); try { - Thread.sleep(_normalSleepTime); + Thread.sleep(_gcWaitTime); } catch (InterruptedException ignored) { } _usedBytes = MEMORY_MX_BEAN.getHeapMemoryUsage().getUsed(); - if (_usedBytes < _criticalLevel) { + if (_usedBytes < _criticalLevelAfterGC) { Review Comment: We can set it to default to 5. 0 is a special case to enable the always gc before kill behaviour. I have added related descriptions in the code comment. Will add them to git doc as well. -- 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: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org