vrajat commented on code in PR #16299:
URL: https://github.com/apache/pinot/pull/16299#discussion_r2200441571
##########
pinot-core/src/main/java/org/apache/pinot/core/accounting/PerQueryCPUMemAccountantFactory.java:
##########
@@ -132,6 +132,8 @@ public static class PerQueryCPUMemResourceUsageAccountant
implements ThreadResou
protected final Set<String> _inactiveQuery;
+ protected Set<String> _cancelSentQueries;
Review Comment:
Its not possible to use it. Its not the best name. Probably a better name is
`seenQueries`. Stepping back, this is what it is used for:
* The feature has to keep track of resource usage of finished tasks. This is
tracked in `Map<String, AggregatedStats> _finishedTasksOfQuery` where key is
query id.
* Running tasks are tracked indirectly in `Map<Thread, TaskEntry>
_threadEntriesMap`. `TaskEntry` has the query id.
* `_finishedTasksOfQuery` has to be cleared regularly. Otherwise it will
grow unbounded.
* The class clears it when there are no active threads for that query id -
or no entries in `_threadEntriesMap`.
If a query id is in `_finishedTasksOfQuery` but not in `_threadEntriesMap`
then that query is done. (This can be wrong where query is not done and no
threads are running) All records of that query id should be cleared. Thats what
`_inactiveQuery` does. It maintains the difference of query ids seen in one map
and not in the other.
--
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]