casbin / jcasbin

An authorization library that supports access control models like ACL, RBAC, ABAC in Java
https://casbin.org
Apache License 2.0
2.4k stars 464 forks source link

ConcurrentModificationException #399

Closed rajp33 closed 1 month ago

rajp33 commented 4 months ago

I believe a fix was put out a while ago for ConcurrentModificationExceptions being thrown. We still see some being thrown here and there. Don't have much to go off of besides a stacktrace though. Not able to consistently reproduce it

Screenshot 2024-06-15 at 11 38 22 PM
casbin-bot commented 4 months ago

@tangyang9464 @imp2002

nodece commented 4 months ago

Default enforce is non-thread-safe, you can switch to SyncedEnforcer, or you add a loading request to the single thread to avoid the concurrent issue.