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: concurrent access issues with HashSet<string> #361

Merged
merged 1 commit into from
Aug 3, 2024

Conversation

seanamorosoamtote
Copy link
Contributor

Came across issues that are similar to #336

Was able to create a concurrent update of the grouping policy which would trigger concurrent access errors. It would work OK with only 100, but once you hit 500 or greater it would fail almost 100% of the time.

I don't think this should go into master as-is, but one of your members can take what is here and make the appropriate changes to handle the access. You can remove my code changes and just use the test and models to see the test fail.

@casbin-bot
Copy link
Member

@sagilio please review

@casbin-bot casbin-bot requested a review from sagilio June 11, 2024 18:11
@CLAassistant
Copy link

CLAassistant commented Jun 11, 2024

CLA assistant check
All committers have signed the CLA.

@sagilio sagilio self-assigned this Jun 12, 2024
@sagilio sagilio added the bug Something isn't working label Jun 12, 2024
@sagilio
Copy link
Member

sagilio commented Jun 12, 2024

Thank you, I will try to reproduce the test failure scenario.
The changes currently appear to be effective and correct, I think there might not be much need for further modifications.

@hsluoyz
Copy link
Member

hsluoyz commented Jun 16, 2024

@seanamorosoamtote plz sign CLA:

image

@sagilio sagilio merged commit 6863c41 into casbin:master Aug 3, 2024
8 checks passed
Copy link

🎉 This PR is included in version 2.9.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@sagilio sagilio linked an issue Aug 15, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enforcer hangs during multi-threaded modifications
5 participants