praveenc7 commented on code in PR #16172:
URL: https://github.com/apache/pinot/pull/16172#discussion_r2162611002
##########
pinot-core/src/main/java/org/apache/pinot/core/accounting/PerQueryCPUMemAccountantFactory.java:
##########
@@ -892,35 +908,16 @@ private void killMostExpensiveQuery() {
" Query %s got killed because using %d bytes of memory on
%s: %s, exceeding the quota",
maxUsageTuple._queryId, maxUsageTuple.getAllocatedBytes(),
_instanceType, _instanceId)));
interruptRunnerThread(maxUsageTuple.getAnchorThread());
- LOGGER.error("Query {} got picked because using {} bytes of
memory, actual kill committed true}",
- maxUsageTuple._queryId, maxUsageTuple._allocatedBytes);
- LOGGER.error("Current task status recorded is {}",
_threadEntriesMap);
+ logTerminatedQuery(maxUsageTuple, _usedBytes);
} else if (!_oomKillQueryEnabled) {
LOGGER.warn("Query {} got picked because using {} bytes of memory,
actual kill committed false "
+ "because oomKillQueryEnabled is false",
maxUsageTuple._queryId, maxUsageTuple._allocatedBytes);
} else {
LOGGER.warn("But all queries are below quota, no query killed");
}
- } else {
- maxUsageTuple =
Collections.max(_aggregatedUsagePerActiveQuery.values(),
- Comparator.comparing(AggregatedStats::getCpuTimeNs));
- if (_oomKillQueryEnabled) {
Review Comment:
Looks like this was dead-code and never reached, good catch to remove this
--
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]