-
Bug
-
Resolution: Fixed
-
High
-
1.0
getUsersWithPermission users UserService.findUsersByGroup to load the StashUsers for each group. It then calls getName() name on all of these users to get the usernames. Under the hood embedded crowd loads each user by name for the findUsersByGroup query if there are multiple directories and the user isn't in the first one. This can make getUsersWithPermission incredibly expensive (n+1 problem).
The LicenseService attempts to mitigate this by caching the licensed user count. However it maintains 5 separate caches requiring the licensed user count to be repopulated for each. The cache should be consolidated and repopulated in the background to minimise the impact on end users.
Workaround
The current workaround is to reorder the directories to have the largest directory first. When doing this you should be mindful of STASH-3717 which can lead to users being locked out of Stash
- was split into
-
CWD-3809 ApplicationServiceGeneric#searchNestedGroupRelationships performs n+1 queries in order to shadow users
- Closed
-
BSERV-4396 Increase license service cache expiration
- Closed