Skip to content
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

nsqd: memory leaks #237

Merged
merged 2 commits into from
Aug 2, 2013
Merged

nsqd: memory leaks #237

merged 2 commits into from
Aug 2, 2013

Conversation

mreiferson
Copy link
Member

This fixes two (potential) memory leaks.

see commit comments

ready @jehiah

when a channel is deleted that has clients and is actively
delivering messages it is possible that messagePump()
will block on its go channel write to clientMsgChan due to
race between that write and the exiting of all clients subscribed
to that channel.

if that happens, the messagePump for the deleted channel
never exits and a reference is retained preventing the
channel from being GCd.
when the channels for a topic *shrinks* we weren't
correctly discarding the pointer to the deleted
channel
jehiah added a commit that referenced this pull request Aug 2, 2013
@jehiah jehiah merged commit 9af3a91 into nsqio:master Aug 2, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants