-
Notifications
You must be signed in to change notification settings - Fork 137
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
drop consumers if their out buffer fills up #417
Conversation
hrm.... this isnt quite right, it doesnt close out the connections and will result in a hanging subscriber |
This should work now |
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.
LGTM
Actually we should probably emit a |
events/events.go
Outdated
go func(torem *Subscriber) { | ||
em.rmSubscriber(torem) | ||
select { | ||
case s.outgoing <- &XRPCStreamEvent{ |
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.
should this be torem.outgoing
?
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.
good catch reviewer.
events/events.go
Outdated
}, | ||
}: | ||
case <-time.After(time.Second * 5): | ||
log.Warnw("failed to send error frame to backed up consumer", "ident", s.ident) |
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.
this should be torem.ident
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.
ah dammit
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.
LGTM again
right now if these buffers fill up we just start dropping events, and then when the buffers drain we just resume sending events. this seems quite wrong.