Fix MinionSubTaskHighWaitTime alert to self-resolve using gauge#18517
Open
swaminathanmanish wants to merge 2 commits into
Open
Fix MinionSubTaskHighWaitTime alert to self-resolve using gauge#18517swaminathanmanish wants to merge 2 commits into
swaminathanmanish wants to merge 2 commits into
Conversation
Replace ControllerTimer.SUBTASK_WAITING_TIME (histogram) with a new MAX_SUBTASK_WAIT_TIME_MS gauge in TaskMetricsEmitter. The timer's _Max stat retains its peak value across emission cycles and does not decay when the queue drains, causing the alert to stay firing after all subtasks have finished. The new gauge is written every cycle with the current max wait time across waiting subtasks for each (table, taskType) pair, defaulting to 0 when no subtasks are waiting, so the alert self-resolves on the next emit cycle. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## master #18517 +/- ##
============================================
- Coverage 63.48% 56.77% -6.72%
+ Complexity 1627 7 -1620
============================================
Files 3244 2567 -677
Lines 197365 148958 -48407
Branches 30540 24099 -6441
============================================
- Hits 125306 84564 -40742
+ Misses 62019 57205 -4814
+ Partials 10040 7189 -2851
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…IT_TIME_MS gauge Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
MinionSubTaskHighWaitTimealert does not self-resolve after the minion queue drains because it is based onControllerTimer.SUBTASK_WAITING_TIME, a histogram. Histogram_Maxretains its peak value across emission cycles and does not decay when there are no longer any waiting subtasks, causing the alert to stay firing indefinitely.MAX_SUBTASK_WAIT_TIME_MSgauge inControllerGauge(per-table, non-global)TaskMetricsEmitter, replace the timer emission with per-(table, taskType)gauge emission: the max wait time across all waiting subtasks, or0when none are waitingremoveTableTaskTypeMetricswhen a task type/table is retiredTaskMetricsEmitterTestto reflect the new metric and assert correct gauge valuesThe gauge is written every emit cycle and self-resolves when the queue clears. Alert rule update (separate config repo):
Test plan
TaskMetricsEmitterTestupdated with assertions formaxSubtaskWaitTimeMsgauge values per table (3000ms for waiting table, 0ms for non-waiting table)./mvnw -pl pinot-controller -am -Dtest=TaskMetricsEmitterTest test