bittu9975 commented on PR #8703: URL: https://github.com/apache/gravitino/pull/8703#issuecomment-3350383819
@jerqi You are right that, from the current usage, AuthorizationRequestContext would not be accessed by more than one thread. My motivation for doing this change was to make loadRole() more future-proof and robust against future race conditions if the usage pattern changes (e.g., multi-threaded server environments or future functionality). The extra concurrency guard loads the role only once without incurring heavy overhead. That being the case, if the maintainers prefer this extra complexity isn't required at the moment, I'd be content to just make it simpler. Would you like me to: Revert to the less complicated AtomicBoolean.compareAndSet guard, or Maintain the present concurrency-safe solution for future security, perhaps with better documentation, or Do something entirely different? -- 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]
