adutra opened a new pull request, #534: URL: https://github.com/apache/polaris/pull/534
This PR is motivated by the following issues: * `RateLimiter` implementations are typically request-scoped, because they are sensitive to the realm context, but keeping a cache of token buckets per realm must be delegated to a separate, application-scoped bean: this is solved by introducing a new `TokenBucketFactory` bean. * `TokenBucketRateLimiter` should NOT implement `RateLimiter`, because that would result in two available beans for this interface: the one selected by configuration (`realm-token-bucket` or `no-op`), and this one which is always available, thus triggering an unresolvable bean error when using the Quarkus runtime. Instead, this class is now just a general-purpose Token Bucket implementation. This PR has one minor user-facing change: * The configuration options for the `realm-token-bucket` rate limiter were moved from the `rateLimiter` section to the `tokenBucketFactory` section. -- 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]
