BenjaminMolnar commented on issue #13612: URL: https://github.com/apache/gravitino/issues/13612#issuecomment-5947705968
Hi, I'd like to work on this, unless you plan to do it yourself after #13606. My plan: - in `JcasbinAuthorizer`, keep the in-flight role loads in a `ConcurrentHashMap<Long, CompletableFuture<...>>` keyed by role id; the first request that finds the role stale runs the load, the others wait for the same future - complete the future exceptionally when the load fails, so every waiter fails closed as today, and remove the entry when the load ends (success or failure) so a later request can load again - keep the policy replacement under `rolePolicyLock` as it is now - tests: N concurrent requests for one evicted role cause one role read, a failed load is reported to all waiters, the next request after a failure reloads, and different roles still load in parallel Should I base it on #13606 or wait until it is merged? Thank you in advance. -- 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]
