-
Notifications
You must be signed in to change notification settings - Fork 345
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
concurrent map iteration and map write #858
Comments
Can you describe the steps to reproduce this bug? |
There is a new feature in Go 1.8 to detect concurrent edit and access to a map. It's described at https://tip.golang.org/doc/go1.8#mapiter |
properties := make(map[string]string) I guess it is caused by multiplexing map(pulsar.ProducerMessage.Properties) when send asyn, This is an occasional bug. |
In Go, a map is a reference type. Properties is a map. A producer application can still update the map while it's passed to the go client. This might be where the problem is. The original stack trace is from internalSend that is a Send(). I guess the problem should exist in both Send and SendAsync. The producer application should not concurrently update the properties. |
Has this issue been fixed? I'm currently experiencing the problem with the version Actual behavior
Steps to reproduce
The fatal error usually occurs after just 40/50 iterations. |
Have you changed the |
I had the map used as the source actually shared, when creating the messages individually. Thank you for your help, much appreciated. |
When the map is shared, you will trigger this bug. Please avoid this usage. |
Expected behavior
Actual behavior
Tell us what happens instead
Steps to reproduce
How can we reproduce the issue
System configuration
Pulsar version: 0.8.1
The text was updated successfully, but these errors were encountered: