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

Fix race condition in glob collections #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

PapaCharlie
Copy link
Member

When subscribing to a glob collection that is being updated, the nonNilValueNames set was being accessed in an unprotected way. This was generally safe as it was only used by new subscribers when they subscribed to empty collections. However, it was still potentially problematic. This fix not only addresses this race condition, but by refactoring NotifyHandlerAfterSubscription, it also allows multiple subscribers to subscribe to the glob collection concurrently. This will hopefully speed up the processing of new clients subscribing to many large glob collections all at once (which can happen during startup).

When subscribing to a glob collection that is being updated, the
`nonNilValueNames` set was being accessed in an unprotected way. This was
generally safe as it was only used by new subscribers when they subscribed to
empty collections. However, it was still potentially problematic. This fix not
only addresses this race condition, but by refactoring
`NotifyHandlerAfterSubscription`, it also allows multiple subscribers to
subscribe to the glob collection concurrently. This will hopefully speed up the
processing of new clients subscribing to many large glob collections all at once
(which can happen during startup).
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

Successfully merging this pull request may close these issues.

1 participant