Skip to content

rls: Document RefCountedChildPolicyWrapperFactory as non-threadsafe #11124

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

Merged
merged 1 commit into from
Apr 25, 2024

Conversation

ejona86
Copy link
Member

@ejona86 ejona86 commented Apr 23, 2024

Instead of having docs in RefCountedChildPolicyWrapperFactory saying that every method was guarded by a lock, I added @GuardedBy("lock") within CachingRlsLbClient, so now it is clearly not thread-safe and the lock protects access. The AtomicLong was replaced with a long since 1) there was no multi-threading and 2) the logic was not atomic-safe which was misleading.

Instead of having docs in RefCountedChildPolicyWrapperFactory saying
that every method was guarded by a lock, I added `@GuardedBy("lock")`
within CachingRlsLbClient, so now it is clearly not thread-safe and the
lock protects access. The AtomicLong was replaced with a long since
1) there was no multi-threading and 2) the logic was not atomic-safe
which was misleading.
@ejona86 ejona86 requested a review from larry-safran April 23, 2024 22:20
@ejona86 ejona86 merged commit 0561954 into grpc:master Apr 25, 2024
@ejona86 ejona86 deleted the rls-doc-notthreadsafe branch April 25, 2024 22:35
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants