tirkarthi commented on issue #60265: URL: https://github.com/apache/airflow/issues/60265#issuecomment-3724748671
Ok, as per my understanding it seems User.roles loads through Role objects and each role object has permissions attribute which joins permission and each permission is associated with a resource and other objects resulting in this big joined query. Using lazy="raise" doesn't perform the join query insider `deserialize_user` but then goes on to raise exception during permission checking in the other part. For every request this whole mapping of user, roles, permissions, views and menus is done twice. https://github.com/apache/airflow/blob/2c5487c924ea653278a521443c96a126c2046584/providers/fab/src/airflow/providers/fab/auth_manager/models/__init__.py#L249-L256 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
