justinmclean opened a new issue, #8665: URL: https://github.com/apache/gravitino/issues/8665
### What would you like to be improved? In core/src/main/java/org/apache/gravitino/authorization/AuthorizationRequestContext.java, the loadRole method has a concurrency issue. The current implementation checks the hasLoadRole flag before invoking the initializer, but it only set the flag to true after the runnable finished. Two threads racing through this code could both see hasLoadRole.get() as false, execute runnable.run(), and only then store true, so the initializer might run twice or more in parallel. ### How should we improve? _No response_ -- 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]
