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

Clarify that it is not safe to call any of the methods of the Memberlist type inside the EventDelegate methods. #23

Open
erikdubbelboer opened this issue Dec 9, 2014 · 2 comments

Comments

@erikdubbelboer
Copy link
Contributor

The problem I'm experiencing is that I call Memberlist.Members() inside the NotifyLeave delegate of that memberlist. This will block everything on the Memberlist.nodeLock.

My instance was waiting in the following places, I didn't have enough time to look for where the lock was actually held.
https://github.com/hashicorp/memberlist/blob/master/memberlist.go#L403
https://github.com/hashicorp/memberlist/blob/master/state.go#L298
https://github.com/hashicorp/memberlist/blob/master/state.go#L168

@armon
Copy link
Member

armon commented Dec 9, 2014

Yep, we can update the interface documentation. Definitely not safe to callback into memberlist!

@mehulpoddar
Copy link

Hey! Did anyone find any workaround or solution to this.
Facing several problems because of this...
Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants