rmdmattingly opened a new pull request, #8774: URL: https://github.com/apache/hbase/pull/8774
https://issues.apache.org/jira/browse/HBASE-30348 Draft to get CI on the direction discussed in #8617: throttling is best effort, so no request ever waits for the quota cache, and a request that arrives before quota data is available is simply not throttled. ### Changes from #8617 **The initial quota cache load never blocks a request.** #8617 bounded the wait with a timeout, but every request still serialized on the initializer lock and waited out that timeout while the master was initializing. Now the first lookup starts the load in the background and returns default quota state immediately. That removes the deadlock regardless of which tables are read during master initialization, so the timeout config is gone. **The cache is only ready once a load fully succeeds.** Failed loads are retried every second. Otherwise a load that ran before `hbase:quota` existed, which is the branch-2 startup case, would mark the cache ready with nothing in it and leave quotas unenforced until the next periodic refresh, 12 hours by default. **Quota factors for newly limited tables.** Making the load asynchronous exposed an existing bug that `TestClusterScopeQuotaThrottle` had only been passing because of the extra synchronous load. Cluster scope table quotas are converted to machine scope using factors computed from the quotas cached *before* the fetch, so a table that just got a quota was given factor 1, the full cluster limit on every RegionServer, until the next refresh. A refresh that finds tables with new quotas now recomputes factors and fetches again. Per-user table quotas now get factors too; previously only tables with a table quota did. The `hbase:meta`, `hbase:quota` and `hbase:namespace` exemptions are unchanged here. With the load no longer blocking, they are no longer what prevents the startup deadlock, so whether to keep them is a separate question. ### Testing `TestQuotaCache2` adds two tests: a lookup returns within a bounded time while the `hbase:quota` read hangs, and a failed initial load is retried until it succeeds. `TestQuotaCache` now waits for the initial load before asserting. Locally on master with JDK 17, `org.apache.hadoop.hbase.quotas`: 303 tests, 0 failures, 0 errors, 18 skipped (`TestQuotaThrottle` is disabled by HBASE-27243). 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
