xiangfu0 commented on code in PR #18163:
URL: https://github.com/apache/pinot/pull/18163#discussion_r3067928476
##########
pinot-core/src/main/java/org/apache/pinot/core/accounting/QueryResourceAggregator.java:
##########
@@ -179,7 +200,22 @@ public void postAggregate() {
}
switch (_triggeringLevel) {
case HeapMemoryCritical:
- killMostExpensiveQuery();
+ QueryMonitorConfig config = _queryMonitorConfig.get();
+ if (_pauseActive) {
+ // Pause is active - check if grace period expired
+ if (System.currentTimeMillis() >= _pauseDeadlineMs) {
+ clearPause();
Review Comment:
Clearing the pause before `killMostExpensiveQuery()` wakes every blocked
query while the heap is still critical. Query termination here is cooperative
(`terminate()` just sets the exception / cancels registered futures), so those
threads can resume allocating again before the victim observes termination.
That defeats the quiescence this pause is supposed to provide and can push the
JVM straight into panic. The pause needs to stay active until after the victim
query has been selected and terminated.
--
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]