-
Notifications
You must be signed in to change notification settings - Fork 443
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
Panic in producer's router #345
Comments
Plus 1 |
I'm not too surprised there's a bug in this part of the codebase, it's not heavily used by the original developers. I think the original devs mostly either publish only to localhost on each server that produces messages, in some cases with this library but in other cases just using http from a service written in a different language, or through an http load balancer to a small cluster of nsqd (thus via http). The I don't think gotos, goroutines, or races are involved in this. Each Producer starts one goroutine, running Only the single The bug might simply be that this code assumes that I'll open a quick PR. If you can provide a reproducer script, or validate that the PR makes a noticeable difference in your infrastructure (confirming the hypothesis), that would be helpful. Here it is: #346 |
We have retries system which does resending to producers in a round-robin manner, and under some circumstances when nsq services are restarting - this library can easily crash the application. It looks like its internals are not thread-safe and written in a very outdated golang style, which makes it extremely hard to investigate where exactly issue is:
go-nsq: v1.1.0
PS. please dont fork goroutines uncontrollably, instead of poorly controlled channels - use a friendly worker pool library with a managed set of worker goroutines, where you can wait for all tasks to be done, and stop using goto - its not ANSI C89...
The text was updated successfully, but these errors were encountered: