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: ListUsers race conditions #1551

Merged
merged 3 commits into from
Apr 19, 2024
Merged

Conversation

miparnisari
Copy link
Member

@miparnisari miparnisari commented Apr 18, 2024

There is a race condition in ListUsers caused by two goroutines in expandExclusion trying to write to the same object. In this PR I fix it and add tests for the other cases (union and intersection) just in case.

@miparnisari miparnisari marked this pull request as ready for review April 18, 2024 20:56
@miparnisari miparnisari requested a review from a team as a code owner April 18, 2024 20:56
Copy link
Contributor

@willvedd willvedd left a comment

Choose a reason for hiding this comment

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

Looks good overall!

pkg/server/commands/listusers/list_users_rpc.go Outdated Show resolved Hide resolved
pkg/server/commands/listusers/list_users_rpc.go Outdated Show resolved Hide resolved
pkg/server/commands/listusers/list_users_rpc.go Outdated Show resolved Hide resolved
@miparnisari miparnisari changed the title fix: list users race conditions fix: ListUsers race conditions Apr 19, 2024
@miparnisari miparnisari merged commit d5ada2e into list-users Apr 19, 2024
3 of 5 checks passed
@miparnisari miparnisari deleted the list-users-concurrency branch April 19, 2024 15:48
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.

None yet

4 participants