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

cache: hold a read lock while canceling a snapshot watch. #507

Merged
merged 1 commit into from
Oct 25, 2021

Conversation

jpeach
Copy link
Contributor

@jpeach jpeach commented Oct 21, 2021

Since canceling a watch only modified the corresponding statusInfo, we
don't need to hold a write lock on the snapshot cache. Holding a read
lock is sufficient to ensure that the status entry is stable.

This updates #503.

Signed-off-by: James Peach jpeach@apache.org

Since canceling a watch only modified the corresponding statusInfo, we
don't need to hold a write lock on the snapshot cache. Holding a read
lock is sufficient to ensure that the status entry is stable.

This updates envoyproxy#503.

Signed-off-by: James Peach <jpeach@apache.org>
Copy link
Contributor

@alecholmez alecholmez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this!

@alecholmez alecholmez merged commit 67cd1a1 into envoyproxy:main Oct 25, 2021
@alecholmez alecholmez changed the title Hold a read lock while canceling a snapshot watch. cache: hold a read lock while canceling a snapshot watch. Oct 25, 2021
@jpeach jpeach deleted the rdlock-on-cancel branch October 25, 2021 22:24
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.

2 participants