Casbin.NET
Casbin.NET copied to clipboard
fix: concurrent access issues with HashSet<string>
Came across issues that are similar to https://github.com/casbin/Casbin.NET/issues/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.
@sagilio please review
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.
@seanamorosoamtote plz sign CLA:
:tada: This PR is included in version 2.9.1 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket: