-
Notifications
You must be signed in to change notification settings - Fork 175
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
protect storage writes #200
Conversation
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
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.
Protecting that makes sense absolutely, but if you only protect that one code branch we might only buy some time and the problem will reappear later. So I suggest using the lock everywhere mStorages is used. Use RLock/RUnlock
when reading only and Lock/Unlock
for writing.
Sounds great! |
@frairon did you meant it the way it is now? I also did a similar thing for the in-memory storage defined outside of the tester because I think a similar problem could occur. |
We are creating multiple processors in a short time in our tests and they are failing sometimes because of concurrent map writes. We think we traced the problem to this point.