Severity: Medium
Category
Performance / Concurrency
Files
internal/controller/group_controller.go:166-167
Description
CacheMutex.Lock() is acquired before the LDAP fetch and held through all backend API calls and cache updates. When MaxConcurrentReconciles > 1 is configured, all reconciler goroutines still serialize on this mutex. LDAP queries and backend API calls run while holding the lock so slow external calls block every other reconciliation.
The lock effectively makes concurrent reconciliation a no-op.
Fix
Move the lock to wrap only the cache read/write operations. Release it before making LDAP queries and backend API calls. Use a read lock for cache reads and write lock only for cache mutations.
Severity: Medium
Category
Performance / Concurrency
Files
internal/controller/group_controller.go:166-167Description
CacheMutex.Lock()is acquired before the LDAP fetch and held through all backend API calls and cache updates. WhenMaxConcurrentReconciles > 1is configured, all reconciler goroutines still serialize on this mutex. LDAP queries and backend API calls run while holding the lock so slow external calls block every other reconciliation.The lock effectively makes concurrent reconciliation a no-op.
Fix
Move the lock to wrap only the cache read/write operations. Release it before making LDAP queries and backend API calls. Use a read lock for cache reads and write lock only for cache mutations.