product-is
product-is copied to clipboard
Same query gets executed multiple times while serving a single request
Describe the issue: The following query is executed 4-5 times per single authentication request despite the UserIDCache is there.
SELECT UM_USER_ID FROM UM_USER WHERE LOWER(UM_USER_NAME)=LOWER(?) AND UM_TENANT_ID=?
Due to two issues, it causes cache misses and executes above query multiple times.
- The UserManagementAuditLogger is trying to get the user id of the initiator, but for some events the initiator is "wso2.system.user"
- The authenticatedSubjectIdentifier of the user included in AUTHENTICATION_SUCCESS event is an UUID, not the username. So AuthenticationAuditLoggerUtils is trying to get user id of an UUID
Environment information
- Product Version: IS 7.0