vvivekiyer commented on code in PR #16636:
URL: https://github.com/apache/pinot/pull/16636#discussion_r2304871155
##########
pinot-spi/src/main/java/org/apache/pinot/spi/accounting/WorkloadBudgetManager.java:
##########
@@ -113,6 +113,11 @@ public void addOrUpdateWorkload(String workload, long
cpuBudgetNs, long memoryBu
memoryBudgetBytes);
}
+ public void deleteWorkload(String workload) {
+ _workloadBudgets.remove(workload);
Review Comment:
Can we initialize _workloadBudgets only if _isEnabled is true?
Also handle isEnabled in this function before removing.
##########
pinot-spi/src/main/java/org/apache/pinot/spi/accounting/WorkloadBudgetManager.java:
##########
@@ -168,7 +173,7 @@ private void startBudgetResetTask() {
// Also print the budget used in the last enforcement window.
_workloadBudgets.forEach((workload, budget) -> {
BudgetStats stats = budget.getStats();
- LOGGER.debug("Workload: {} -> CPU: {}ns, Memory: {} bytes", workload,
stats._cpuRemaining,
+ LOGGER.info("Workload: {} -> CPU: {}ns, Memory: {} bytes", workload,
stats._cpuRemaining,
Review Comment:
Can we please keep this as debug? This will log profusely during every
refresh if enforcementWindow is small (say 1s).
(Unrelated) can you remove the TODO at the beginning of the function?
--
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]