You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "jineshparakh (via GitHub)" <gi...@apache.org> on 2026/02/23 06:26:12 UTC
[PR] Bound task queue size to prevent ZK bloat [pinot]
jineshparakh opened a new pull request, #17741:
URL: https://github.com/apache/pinot/pull/17741
## Background
Helix task queues in Pinot can grow unboundedly over time. While Helix provides time-based expiry for **COMPLETED** jobs (default 24h), it has no built-in expiry for **FAILED/TIMED_OUT** jobs (`terminalStateExpiry` defaults to `-1`, meaning disabled), and **ABORTED** jobs are never cleaned up at all.
In long-running clusters with high task throughput, this causes thousands of stale terminal jobs to accumulate in ZooKeeper under `/{cluster}/CONFIGS/RESOURCE`.
This ZK bloat degrades Helix controller performance,`WorkflowConfig` and `WorkflowContext` reads become increasingly expensive.
## Changes
This PR introduces a multi-layered defense against task queue bloat:
### 1. Count-based queue trimming *(new)*
Configurable size-based cleanup that runs during `prepTaskQueue`, before new tasks are generated. When the queue exceeds a configurable limit (`controller.task.queue.maxSize`, default `-1`/disabled), the oldest terminal jobs (`COMPLETED`, `FAILED`, `TIMED_OUT`, `ABORTED`) are force-deleted up to a configurable cap per cycle (`controller.task.queue.maxDeletesPerCycle`, default `100`, hard cap `500`).
The implementation uses a bounded max-heap ordered by Helix-recorded job start times (`WorkflowContext.getJobStartTime`) to efficiently select the N oldest terminal jobs without sorting the entire queue. Jobs with unknown start times (`-1`/`NOT_STARTED`) are treated as newest to prevent accidental deletion.
**Design note:** The deletion loop runs inside the existing `synchronized` block. Since this is a proactive fix to prevent gradual ZK/Helix performance degradation, a brief hold time (bounded by `maxDeletesPerCycle`, default `100`) during a background scheduling cycle is an acceptable trade-off over the alternative of unbounded queue growth causing systemic slowdowns.
### 2. Terminal state expiry for FAILED/TIMED_OUT jobs *(new)*
Configures Helix's `JobConfig.terminalStateExpiry` so that `FAILED` and `TIMED_OUT` jobs are eventually purged by Helix's own cleanup mechanism. Default: 72 hours (`controller.task.terminalStateExpireTimeMs`).
### 3. Configurable task expiry *(enhancement)*
The existing `COMPLETED` job expiry (`controller.task.expire.time.ms`, default `24h`) was already configurable at controller startup but required a restart to change. This PR makes it hot-reloadable via cluster config changes.
### 4. Helix queue capacity *(new)*
Sets `WorkflowConfig.capacity` on newly created task queues as a hard ceiling (`controller.task.queue.capacity`, default `-1`/unlimited). When the queue reaches capacity during enqueue, Helix purges expired jobs first; if still full, enqueue fails with `HelixException`. This acts as a safety net complementing the soft count-based trimming.
### 5. Queue size warning threshold *(new)*
Logs a warning when queue size exceeds a configurable threshold (`controller.task.queue.warningThreshold`, default `5000`). This warning fires independently of whether count-based trimming is enabled, giving operators early visibility into queue growth.
### 6. Task queue size metric *(new)*
Emits a `TASK_QUEUE_SIZE` gauge per task type for monitoring and alerting. The gauge resets to `0` if a task type disappears, preventing stale metric values.
### 7. Dynamic configuration
All new and modified settings are hot-reloadable via cluster config changes (`PinotClusterConfigChangeListener` / `onChange`) without requiring a controller restart. Input validation is applied:
- `taskExpireTimeMs` and `terminalStateExpireTimeMs` reject non-positive values
- `maxDeletesPerCycle` rejects non-positive, clamps values above `500`
- `capacity` accepts only `-1` (unlimited) or positive integers
*NOTE:* All the newly introduced changes are disabled by default
--
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: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [PR] Bound task queue size to prevent ZK bloat [pinot]
Posted by "KKcorps (via GitHub)" <gi...@apache.org>.
KKcorps merged PR #17741:
URL: https://github.com/apache/pinot/pull/17741
--
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: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [PR] Bound task queue size to prevent ZK bloat [pinot]
Posted by "shounakmk219 (via GitHub)" <gi...@apache.org>.
shounakmk219 commented on code in PR #17741:
URL: https://github.com/apache/pinot/pull/17741#discussion_r2840302251
##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/minion/PinotTaskManager.java:
##########
@@ -1061,6 +1115,129 @@ protected void nonLeaderCleanup(List<String> tableNamesWithType) {
}
}
+ @Override
+ public void onChange(Set<String> changedConfigs, Map<String, String> clusterConfigs) {
+ // Parent implementation is a no-op; no need to call super.onChange().
+ // This needed to be revisited if parent behavior changes
+ if (clusterConfigs == null) {
+ return;
+ }
+
+ if (changedConfigs == null
+ || changedConfigs.contains(ControllerConf.ControllerPeriodicTasksConf.PINOT_TASK_EXPIRE_TIME_MS)) {
+ String taskExpireStr = clusterConfigs.get(
+ ControllerConf.ControllerPeriodicTasksConf.PINOT_TASK_EXPIRE_TIME_MS);
+ if (taskExpireStr != null) {
+ try {
+ long parsed = Long.parseLong(taskExpireStr);
+ if (parsed <= 0) {
+ LOGGER.warn("Ignoring non-positive value {} for {}", parsed,
+ ControllerConf.ControllerPeriodicTasksConf.PINOT_TASK_EXPIRE_TIME_MS);
+ } else {
+ _helixTaskResourceManager.setTaskExpireTimeMs(parsed);
+ }
+ } catch (NumberFormatException e) {
+ LOGGER.warn("Invalid value for {}: {}",
+ ControllerConf.ControllerPeriodicTasksConf.PINOT_TASK_EXPIRE_TIME_MS, taskExpireStr);
+ }
+ }
+ }
+
+ if (changedConfigs == null
Review Comment:
Can we pull out all the config assignments into separate methods and keep onChange concise?
##########
pinot-common/src/main/java/org/apache/pinot/common/metrics/ControllerGauge.java:
##########
@@ -120,6 +120,9 @@ public enum ControllerGauge implements AbstractMetrics.Gauge {
// Number of Tasks Status
TASK_STATUS("taskStatus", false),
+ // Number of jobs in a task queue (per task type)
+ TASK_QUEUE_SIZE("taskQueueSize", false),
Review Comment:
nit : Can we rename this to something like `TASKS_TRACKED_FOR_TASK_TYPE` instead of having "queue" in the name as its confusing for user and usually gets interpreted as pending tasks in task queue
##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/minion/PinotTaskManager.java:
##########
@@ -1061,6 +1115,129 @@ protected void nonLeaderCleanup(List<String> tableNamesWithType) {
}
}
+ @Override
+ public void onChange(Set<String> changedConfigs, Map<String, String> clusterConfigs) {
+ // Parent implementation is a no-op; no need to call super.onChange().
+ // This needed to be revisited if parent behavior changes
+ if (clusterConfigs == null) {
+ return;
+ }
+
+ if (changedConfigs == null
Review Comment:
what does `changedConfigs == null` signify here?
##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/minion/PinotTaskManager.java:
##########
@@ -1061,6 +1115,129 @@ protected void nonLeaderCleanup(List<String> tableNamesWithType) {
}
}
+ @Override
+ public void onChange(Set<String> changedConfigs, Map<String, String> clusterConfigs) {
+ // Parent implementation is a no-op; no need to call super.onChange().
+ // This needed to be revisited if parent behavior changes
+ if (clusterConfigs == null) {
+ return;
+ }
+
+ if (changedConfigs == null
+ || changedConfigs.contains(ControllerConf.ControllerPeriodicTasksConf.PINOT_TASK_EXPIRE_TIME_MS)) {
+ String taskExpireStr = clusterConfigs.get(
+ ControllerConf.ControllerPeriodicTasksConf.PINOT_TASK_EXPIRE_TIME_MS);
+ if (taskExpireStr != null) {
+ try {
+ long parsed = Long.parseLong(taskExpireStr);
+ if (parsed <= 0) {
+ LOGGER.warn("Ignoring non-positive value {} for {}", parsed,
+ ControllerConf.ControllerPeriodicTasksConf.PINOT_TASK_EXPIRE_TIME_MS);
+ } else {
+ _helixTaskResourceManager.setTaskExpireTimeMs(parsed);
+ }
+ } catch (NumberFormatException e) {
+ LOGGER.warn("Invalid value for {}: {}",
+ ControllerConf.ControllerPeriodicTasksConf.PINOT_TASK_EXPIRE_TIME_MS, taskExpireStr);
+ }
+ }
+ }
+
+ if (changedConfigs == null
+ || changedConfigs.contains(
+ ControllerConf.ControllerPeriodicTasksConf.PINOT_TASK_TERMINAL_STATE_EXPIRE_TIME_MS)) {
+ String terminalExpireStr = clusterConfigs.get(
+ ControllerConf.ControllerPeriodicTasksConf.PINOT_TASK_TERMINAL_STATE_EXPIRE_TIME_MS);
+ if (terminalExpireStr != null) {
+ try {
+ long parsed = Long.parseLong(terminalExpireStr);
+ if (parsed <= 0) {
+ LOGGER.warn("Ignoring non-positive value {} for {}", parsed,
+ ControllerConf.ControllerPeriodicTasksConf.PINOT_TASK_TERMINAL_STATE_EXPIRE_TIME_MS);
+ } else {
+ _helixTaskResourceManager.setTerminalStateExpireTimeMs(parsed);
+ }
+ } catch (NumberFormatException e) {
+ LOGGER.warn("Invalid value for {}: {}",
+ ControllerConf.ControllerPeriodicTasksConf.PINOT_TASK_TERMINAL_STATE_EXPIRE_TIME_MS, terminalExpireStr);
+ }
+ }
+ }
+
+ if (changedConfigs == null
+ || changedConfigs.contains(ControllerConf.ControllerPeriodicTasksConf.PINOT_TASK_QUEUE_MAX_SIZE)) {
+ String maxSizeStr = clusterConfigs.get(
+ ControllerConf.ControllerPeriodicTasksConf.PINOT_TASK_QUEUE_MAX_SIZE);
+ if (maxSizeStr != null) {
+ try {
+ _taskQueueMaxSize = Integer.parseInt(maxSizeStr);
+ } catch (NumberFormatException e) {
+ LOGGER.warn("Invalid value for {}: {}",
+ ControllerConf.ControllerPeriodicTasksConf.PINOT_TASK_QUEUE_MAX_SIZE, maxSizeStr);
+ }
+ }
+ }
+
+ if (changedConfigs == null
+ || changedConfigs.contains(
+ ControllerConf.ControllerPeriodicTasksConf.PINOT_TASK_QUEUE_MAX_DELETES_PER_CYCLE)) {
+ String maxDeletesStr = clusterConfigs.get(
+ ControllerConf.ControllerPeriodicTasksConf.PINOT_TASK_QUEUE_MAX_DELETES_PER_CYCLE);
+ if (maxDeletesStr != null) {
+ try {
+ int parsed = Integer.parseInt(maxDeletesStr);
+ if (parsed <= 0) {
+ LOGGER.warn("Ignoring non-positive value {} for {}", parsed,
+ ControllerConf.ControllerPeriodicTasksConf.PINOT_TASK_QUEUE_MAX_DELETES_PER_CYCLE);
+ } else if (parsed > MAX_DELETES_PER_CYCLE_CAP) {
+ LOGGER.warn("Clamping {} to cap {} for {}", parsed, MAX_DELETES_PER_CYCLE_CAP,
+ ControllerConf.ControllerPeriodicTasksConf.PINOT_TASK_QUEUE_MAX_DELETES_PER_CYCLE);
+ _taskQueueMaxDeletesPerCycle = MAX_DELETES_PER_CYCLE_CAP;
+ } else {
+ _taskQueueMaxDeletesPerCycle = parsed;
+ }
+ } catch (NumberFormatException e) {
+ LOGGER.warn("Invalid value for {}: {}",
+ ControllerConf.ControllerPeriodicTasksConf.PINOT_TASK_QUEUE_MAX_DELETES_PER_CYCLE, maxDeletesStr);
+ }
+ }
+ }
+
+ if (changedConfigs == null
+ || changedConfigs.contains(ControllerConf.ControllerPeriodicTasksConf.PINOT_TASK_QUEUE_CAPACITY)) {
+ String capacityStr = clusterConfigs.get(
+ ControllerConf.ControllerPeriodicTasksConf.PINOT_TASK_QUEUE_CAPACITY);
+ if (capacityStr != null) {
+ try {
+ int parsed = Integer.parseInt(capacityStr);
+ if (parsed > 0 || parsed == -1) {
+ _helixTaskResourceManager.setQueueCapacity(parsed);
+ } else {
+ LOGGER.warn("Ignoring invalid capacity {} for {}. Must be -1 (unlimited) or positive.",
+ parsed, ControllerConf.ControllerPeriodicTasksConf.PINOT_TASK_QUEUE_CAPACITY);
+ }
+ } catch (NumberFormatException e) {
+ LOGGER.warn("Invalid value for {}: {}",
+ ControllerConf.ControllerPeriodicTasksConf.PINOT_TASK_QUEUE_CAPACITY, capacityStr);
+ }
+ }
+ }
+
+ if (changedConfigs == null
+ || changedConfigs.contains(ControllerConf.ControllerPeriodicTasksConf.PINOT_TASK_QUEUE_WARNING_THRESHOLD)) {
+ String warningStr = clusterConfigs.get(
+ ControllerConf.ControllerPeriodicTasksConf.PINOT_TASK_QUEUE_WARNING_THRESHOLD);
+ if (warningStr != null) {
+ try {
+ _taskQueueWarningThreshold = Integer.parseInt(warningStr);
+ } catch (NumberFormatException e) {
+ LOGGER.warn("Invalid value for {}: {}",
+ ControllerConf.ControllerPeriodicTasksConf.PINOT_TASK_QUEUE_WARNING_THRESHOLD, warningStr);
+ }
+ }
+ }
+ }
Review Comment:
can we put a consolidated log line with all the set values for better visibility?
--
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: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [PR] Bound task queue size to prevent ZK bloat [pinot]
Posted by "jineshparakh (via GitHub)" <gi...@apache.org>.
jineshparakh commented on code in PR #17741:
URL: https://github.com/apache/pinot/pull/17741#discussion_r2842084771
##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/minion/PinotTaskManager.java:
##########
@@ -1061,6 +1115,129 @@ protected void nonLeaderCleanup(List<String> tableNamesWithType) {
}
}
+ @Override
+ public void onChange(Set<String> changedConfigs, Map<String, String> clusterConfigs) {
+ // Parent implementation is a no-op; no need to call super.onChange().
+ // This needed to be revisited if parent behavior changes
+ if (clusterConfigs == null) {
+ return;
+ }
+
+ if (changedConfigs == null
+ || changedConfigs.contains(ControllerConf.ControllerPeriodicTasksConf.PINOT_TASK_EXPIRE_TIME_MS)) {
+ String taskExpireStr = clusterConfigs.get(
+ ControllerConf.ControllerPeriodicTasksConf.PINOT_TASK_EXPIRE_TIME_MS);
+ if (taskExpireStr != null) {
+ try {
+ long parsed = Long.parseLong(taskExpireStr);
+ if (parsed <= 0) {
+ LOGGER.warn("Ignoring non-positive value {} for {}", parsed,
+ ControllerConf.ControllerPeriodicTasksConf.PINOT_TASK_EXPIRE_TIME_MS);
+ } else {
+ _helixTaskResourceManager.setTaskExpireTimeMs(parsed);
+ }
+ } catch (NumberFormatException e) {
+ LOGGER.warn("Invalid value for {}: {}",
+ ControllerConf.ControllerPeriodicTasksConf.PINOT_TASK_EXPIRE_TIME_MS, taskExpireStr);
+ }
+ }
+ }
+
+ if (changedConfigs == null
Review Comment:
Done
##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/minion/PinotTaskManager.java:
##########
@@ -1061,6 +1115,129 @@ protected void nonLeaderCleanup(List<String> tableNamesWithType) {
}
}
+ @Override
+ public void onChange(Set<String> changedConfigs, Map<String, String> clusterConfigs) {
+ // Parent implementation is a no-op; no need to call super.onChange().
+ // This needed to be revisited if parent behavior changes
+ if (clusterConfigs == null) {
+ return;
+ }
+
+ if (changedConfigs == null
Review Comment:
Have added it as a defensive check to prevent gets from a NULL map.
--
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: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [PR] Bound task queue size to prevent ZK bloat [pinot]
Posted by "jineshparakh (via GitHub)" <gi...@apache.org>.
jineshparakh commented on code in PR #17741:
URL: https://github.com/apache/pinot/pull/17741#discussion_r2842086000
##########
pinot-common/src/main/java/org/apache/pinot/common/metrics/ControllerGauge.java:
##########
@@ -120,6 +120,9 @@ public enum ControllerGauge implements AbstractMetrics.Gauge {
// Number of Tasks Status
TASK_STATUS("taskStatus", false),
+ // Number of jobs in a task queue (per task type)
+ TASK_QUEUE_SIZE("taskQueueSize", false),
Review Comment:
Done
##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/minion/PinotTaskManager.java:
##########
@@ -1061,6 +1115,129 @@ protected void nonLeaderCleanup(List<String> tableNamesWithType) {
}
}
+ @Override
+ public void onChange(Set<String> changedConfigs, Map<String, String> clusterConfigs) {
+ // Parent implementation is a no-op; no need to call super.onChange().
+ // This needed to be revisited if parent behavior changes
+ if (clusterConfigs == null) {
+ return;
+ }
+
+ if (changedConfigs == null
+ || changedConfigs.contains(ControllerConf.ControllerPeriodicTasksConf.PINOT_TASK_EXPIRE_TIME_MS)) {
+ String taskExpireStr = clusterConfigs.get(
+ ControllerConf.ControllerPeriodicTasksConf.PINOT_TASK_EXPIRE_TIME_MS);
+ if (taskExpireStr != null) {
+ try {
+ long parsed = Long.parseLong(taskExpireStr);
+ if (parsed <= 0) {
+ LOGGER.warn("Ignoring non-positive value {} for {}", parsed,
+ ControllerConf.ControllerPeriodicTasksConf.PINOT_TASK_EXPIRE_TIME_MS);
+ } else {
+ _helixTaskResourceManager.setTaskExpireTimeMs(parsed);
+ }
+ } catch (NumberFormatException e) {
+ LOGGER.warn("Invalid value for {}: {}",
+ ControllerConf.ControllerPeriodicTasksConf.PINOT_TASK_EXPIRE_TIME_MS, taskExpireStr);
+ }
+ }
+ }
+
+ if (changedConfigs == null
+ || changedConfigs.contains(
+ ControllerConf.ControllerPeriodicTasksConf.PINOT_TASK_TERMINAL_STATE_EXPIRE_TIME_MS)) {
+ String terminalExpireStr = clusterConfigs.get(
+ ControllerConf.ControllerPeriodicTasksConf.PINOT_TASK_TERMINAL_STATE_EXPIRE_TIME_MS);
+ if (terminalExpireStr != null) {
+ try {
+ long parsed = Long.parseLong(terminalExpireStr);
+ if (parsed <= 0) {
+ LOGGER.warn("Ignoring non-positive value {} for {}", parsed,
+ ControllerConf.ControllerPeriodicTasksConf.PINOT_TASK_TERMINAL_STATE_EXPIRE_TIME_MS);
+ } else {
+ _helixTaskResourceManager.setTerminalStateExpireTimeMs(parsed);
+ }
+ } catch (NumberFormatException e) {
+ LOGGER.warn("Invalid value for {}: {}",
+ ControllerConf.ControllerPeriodicTasksConf.PINOT_TASK_TERMINAL_STATE_EXPIRE_TIME_MS, terminalExpireStr);
+ }
+ }
+ }
+
+ if (changedConfigs == null
+ || changedConfigs.contains(ControllerConf.ControllerPeriodicTasksConf.PINOT_TASK_QUEUE_MAX_SIZE)) {
+ String maxSizeStr = clusterConfigs.get(
+ ControllerConf.ControllerPeriodicTasksConf.PINOT_TASK_QUEUE_MAX_SIZE);
+ if (maxSizeStr != null) {
+ try {
+ _taskQueueMaxSize = Integer.parseInt(maxSizeStr);
+ } catch (NumberFormatException e) {
+ LOGGER.warn("Invalid value for {}: {}",
+ ControllerConf.ControllerPeriodicTasksConf.PINOT_TASK_QUEUE_MAX_SIZE, maxSizeStr);
+ }
+ }
+ }
+
+ if (changedConfigs == null
+ || changedConfigs.contains(
+ ControllerConf.ControllerPeriodicTasksConf.PINOT_TASK_QUEUE_MAX_DELETES_PER_CYCLE)) {
+ String maxDeletesStr = clusterConfigs.get(
+ ControllerConf.ControllerPeriodicTasksConf.PINOT_TASK_QUEUE_MAX_DELETES_PER_CYCLE);
+ if (maxDeletesStr != null) {
+ try {
+ int parsed = Integer.parseInt(maxDeletesStr);
+ if (parsed <= 0) {
+ LOGGER.warn("Ignoring non-positive value {} for {}", parsed,
+ ControllerConf.ControllerPeriodicTasksConf.PINOT_TASK_QUEUE_MAX_DELETES_PER_CYCLE);
+ } else if (parsed > MAX_DELETES_PER_CYCLE_CAP) {
+ LOGGER.warn("Clamping {} to cap {} for {}", parsed, MAX_DELETES_PER_CYCLE_CAP,
+ ControllerConf.ControllerPeriodicTasksConf.PINOT_TASK_QUEUE_MAX_DELETES_PER_CYCLE);
+ _taskQueueMaxDeletesPerCycle = MAX_DELETES_PER_CYCLE_CAP;
+ } else {
+ _taskQueueMaxDeletesPerCycle = parsed;
+ }
+ } catch (NumberFormatException e) {
+ LOGGER.warn("Invalid value for {}: {}",
+ ControllerConf.ControllerPeriodicTasksConf.PINOT_TASK_QUEUE_MAX_DELETES_PER_CYCLE, maxDeletesStr);
+ }
+ }
+ }
+
+ if (changedConfigs == null
+ || changedConfigs.contains(ControllerConf.ControllerPeriodicTasksConf.PINOT_TASK_QUEUE_CAPACITY)) {
+ String capacityStr = clusterConfigs.get(
+ ControllerConf.ControllerPeriodicTasksConf.PINOT_TASK_QUEUE_CAPACITY);
+ if (capacityStr != null) {
+ try {
+ int parsed = Integer.parseInt(capacityStr);
+ if (parsed > 0 || parsed == -1) {
+ _helixTaskResourceManager.setQueueCapacity(parsed);
+ } else {
+ LOGGER.warn("Ignoring invalid capacity {} for {}. Must be -1 (unlimited) or positive.",
+ parsed, ControllerConf.ControllerPeriodicTasksConf.PINOT_TASK_QUEUE_CAPACITY);
+ }
+ } catch (NumberFormatException e) {
+ LOGGER.warn("Invalid value for {}: {}",
+ ControllerConf.ControllerPeriodicTasksConf.PINOT_TASK_QUEUE_CAPACITY, capacityStr);
+ }
+ }
+ }
+
+ if (changedConfigs == null
+ || changedConfigs.contains(ControllerConf.ControllerPeriodicTasksConf.PINOT_TASK_QUEUE_WARNING_THRESHOLD)) {
+ String warningStr = clusterConfigs.get(
+ ControllerConf.ControllerPeriodicTasksConf.PINOT_TASK_QUEUE_WARNING_THRESHOLD);
+ if (warningStr != null) {
+ try {
+ _taskQueueWarningThreshold = Integer.parseInt(warningStr);
+ } catch (NumberFormatException e) {
+ LOGGER.warn("Invalid value for {}: {}",
+ ControllerConf.ControllerPeriodicTasksConf.PINOT_TASK_QUEUE_WARNING_THRESHOLD, warningStr);
+ }
+ }
+ }
+ }
Review Comment:
I refactored the method.
With individual log lines, we have better visibility of the exact change from oldValue to newValue.
We loose that with consolidated logging.
I would like to keep individual logs.
--
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: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [PR] Bound task queue size to prevent ZK bloat [pinot]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #17741:
URL: https://github.com/apache/pinot/pull/17741#issuecomment-3943070281
## [Codecov](https://app.codecov.io/gh/apache/pinot/pull/17741?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 55.54%. Comparing base ([`8ae1048`](https://app.codecov.io/gh/apache/pinot/commit/8ae1048bdb679d6c1d1d829803079c81add3853c?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`70daf33`](https://app.codecov.io/gh/apache/pinot/commit/70daf33a9114c72cb54ba80c82c5d583489a758f?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
> :exclamation: There is a different number of reports uploaded between BASE (8ae1048) and HEAD (70daf33). Click for more details.
>
> <details><summary>HEAD has 32 uploads less than BASE</summary>
>
>| Flag | BASE (8ae1048) | HEAD (70daf33) |
>|------|------|------|
>|java-21|5|1|
>|unittests1|2|1|
>|unittests|3|1|
>|temurin|9|1|
>|java-11|4|0|
>|unittests2|1|0|
>|integration|6|0|
>|integration1|2|0|
>|custom-integration1|2|0|
>|integration2|2|0|
></details>
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #17741 +/- ##
============================================
- Coverage 63.20% 55.54% -7.67%
+ Complexity 1454 720 -734
============================================
Files 3176 2478 -698
Lines 191002 140611 -50391
Branches 29204 22398 -6806
============================================
- Hits 120719 78097 -42622
+ Misses 60871 55912 -4959
+ Partials 9412 6602 -2810
```
| [Flag](https://app.codecov.io/gh/apache/pinot/pull/17741/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [custom-integration1](https://app.codecov.io/gh/apache/pinot/pull/17741/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [integration](https://app.codecov.io/gh/apache/pinot/pull/17741/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [integration1](https://app.codecov.io/gh/apache/pinot/pull/17741/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [integration2](https://app.codecov.io/gh/apache/pinot/pull/17741/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [java-11](https://app.codecov.io/gh/apache/pinot/pull/17741/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [java-21](https://app.codecov.io/gh/apache/pinot/pull/17741/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `55.54% <100.00%> (-7.63%)` | :arrow_down: |
| [temurin](https://app.codecov.io/gh/apache/pinot/pull/17741/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `55.54% <100.00%> (-7.67%)` | :arrow_down: |
| [unittests](https://app.codecov.io/gh/apache/pinot/pull/17741/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `55.54% <100.00%> (-7.66%)` | :arrow_down: |
| [unittests1](https://app.codecov.io/gh/apache/pinot/pull/17741/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `55.54% <100.00%> (-0.05%)` | :arrow_down: |
| [unittests2](https://app.codecov.io/gh/apache/pinot/pull/17741/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/pinot/pull/17741?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
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: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org