praveenc7 commented on code in PR #16636:
URL: https://github.com/apache/pinot/pull/16636#discussion_r2305725771
##########
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();
Review Comment:
The Updates/deletes logs are spare, will update the rest
##########
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:
was initially thinking of keeping delete lenient. For example, if the
feature is disabled and we try to delete a workload, the operation wouldn’t
succeed. However, since the state is in-memory, it would eventually get cleaned
up on restart.
On second thought, it’s probably better to support delete only when the
feature is enabled — it’s more useful when the feature is toggled on and off
and on.
##########
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:
I see some value in quickly debugging. But given we have metrics soon, we
can keep it a debug if we anticipate aggresive enforcementWindow
--
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]