You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use LoadFilteredPolicy and LoadPolicy on SyncedCachedEnforcer in different places, thus they might be called in the same time. I think these two might interfere with each other, because sometimes my backend would wait on LoadFilteredPolicy, it's kind of random and does not have a particular pattern that I can debug with, so I think it's lock-related.
Describe the bug
I'm trying to use LoadFilteredPolicy and LoadPolicy on SyncedCachedEnforcer in different places, thus they might be called in the same time. I think these two might interfere with each other, because sometimes my backend would wait on LoadFilteredPolicy, it's kind of random and does not have a particular pattern that I can debug with, so I think it's lock-related.
I'm using SyncedCachedEnforcer with this adapter https://github.com/pckhoi/casbin-pgx-adapter
To Reproduce
Just change https://github.com/casbin/casbin/blob/master/enforcer_cached_synced_test.go to have it run LoadPolicy and LoadFilteredPolicy concurrently, and the bug persists. It's pretty easy to reproduce.
Expected behavior
No deadlock and no bug.
Related Issue: #1268
The text was updated successfully, but these errors were encountered: