-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[FIXED] JetStream: data race between consumer and stream when updated #5820
Conversation
Some tests were showing often a race between updateWithAdvisory() and isFiltered(). There may be other data races in other files that read the mset's configuration without proper locking, but this PR addresses specifically issues between consumer (consumer.go) and stream. Signed-off-by: Ivan Kozlovic <[email protected]>
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.
@derekcollison I think I don't even need to call to mset.getCfg() since we are protected by the stream's lock there. If you agree, I will update the PR tomorrow.
Signed-off-by: Ivan Kozlovic <[email protected]>
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
I will merge after all green. |
@derekcollison I got a data race on a test for completely different thing (non JS). Can I add it here or do you prefer new PR for that? |
Signed-off-by: Ivan Kozlovic <[email protected]>
Sorry, I did not wait for your answer. It was a quick fix, so added to this PR. |
@derekcollison Ok, got all green, ready to merge! |
Some tests were showing often a race between updateWithAdvisory() and isFiltered().
There may be other data races in other files that read the mset's configuration without proper locking, but this PR addresses specifically issues between consumer (consumer.go) and stream.
Signed-off-by: Ivan Kozlovic [email protected]