-
Notifications
You must be signed in to change notification settings - Fork 12
Add ControllerEventQueueSizeGauge to detect a wedged ("zombie leader" controller) #201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Changes from 1 commit
bd551cb
d9005b8
803f193
4c28785
9ea8207
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -897,6 +897,24 @@ public void testWagedFallbackInUseGaugeReflectsLatestSetter() { | |
| Assert.assertEquals(monitor.getWagedFallbackInUseGauge(), 0L); | ||
| } | ||
|
|
||
| @Test | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should add tests that reflect this PR's behaviour like:
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've added for some which looked related. The rest (gauge climbs on enqueue / drops on dequeue, DEFAULT-vs-TASK queue discrimination, backlog depth across distinct event types) touch the GenericHelixController enqueue/dequeue wiring, so I'll cover those as a follow-up integration test. |
||
| public void testControllerEventQueueSizeGaugeStartsAtZero() { | ||
| ClusterStatusMonitor monitor = new ClusterStatusMonitor("TestControllerEventQueueGaugeCluster"); | ||
| Assert.assertEquals(monitor.getControllerEventQueueSizeGauge(), 0L); | ||
| } | ||
|
|
||
| @Test | ||
| public void testControllerEventQueueSizeGaugeReflectsLatestSetter() { | ||
| ClusterStatusMonitor monitor = | ||
| new ClusterStatusMonitor("TestControllerEventQueueGaugeSetterCluster"); | ||
| Assert.assertEquals(monitor.getControllerEventQueueSizeGauge(), 0L); | ||
| monitor.setControllerEventQueueSizeGauge(7L); | ||
| Assert.assertEquals(monitor.getControllerEventQueueSizeGauge(), 7L); | ||
| // Gauge is reversible: draining the pipeline takes it back down to 0. | ||
| monitor.setControllerEventQueueSizeGauge(0L); | ||
| Assert.assertEquals(monitor.getControllerEventQueueSizeGauge(), 0L); | ||
| } | ||
|
|
||
| @Test | ||
| public void testWagedHardConstraintCountersStartAtZero() { | ||
| ClusterStatusMonitor monitor = new ClusterStatusMonitor("TestWagedHardConstraintCluster"); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should combine this gauge with the progress signal Helix already has, ClusterEventStatus...TotalProcessed.EventCounter
The disambiguator is to combine this gauge with the progress signal Helix already has, ClusterEventStatus...TotalProcessed.EventCounter:
So the robust alert is the conjunction: ControllerEventQueueSizeGauge sustained > 0 AND TotalProcessed.EventCounter rate ~= 0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that will be done on alerting end. I've updated the java doc