-
Notifications
You must be signed in to change notification settings - Fork 887
feat: add watchdog to pubsub #12011
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
feat: add watchdog to pubsub #12011
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @spikecurtis and the rest of your teammates on |
5d02e30
to
d4cc468
Compare
d4cc468
to
4624bf1
Compare
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.
Nice clock usage.
|
||
func (w *Watchdog) subscribeMonitor() { | ||
defer w.wg.Done() | ||
beats := make(chan struct{}) |
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.
It is unbuffered, should we make it non-blocking in case of any perf issues?
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.
PGPubsub buffers events in a ring-buffer, another buffer would be redundant.
4624bf1
to
31c5c83
Compare
Merge activity
|
adds a watchdog to our pubsub and runs it for Coder server.
If the watchdog times out, it triggers a graceful exit in
coder server
to give any provisioner jobs a chance to shut down.c.f. #11950