Skip to content

HubSpot Backport: HBASE-29771 Fix handler usage time quota correction sign (already in 2.6.5) - #273

Draft
cathturner wants to merge 2 commits into
hubspot-2.6from
HBASE-29771-hs26backport
Draft

cathturner wants to merge 2 commits into
hubspot-2.6from
HBASE-29771-hs26backport

Conversation

@cathturner

Copy link
Copy Markdown

DefaultOperationQuota charges an estimate of handler usage time up front and then corrects it when the request closes. The correction was computed as estimate - actual, but RateLimiter.consume() subtracts a positive amount, so each request was charged about 2 * estimate - actual instead of actual. The estimate scales with the RegionServer's total request rate, so a high-volume caller doing many fast requests can exhaust a HANDLER_USAGE_TIME_MS throttle that is far above its real handler usage and get RequestHandlerUsageTimeExceeded. The correction is now actual - estimate, matching how the read and write paths work.

Includes the follow-up HBASE-29793, which repairs TestDefaultHandlerUsageQuota after this change.

Source:

Both are released in 2.6.5, so this commit can be dropped when hubspot-2.6 moves to 2.6.5 or later.

cathturner and others added 2 commits October 14, 2026 17:08
… sign (already in 2.6.5)

DefaultOperationQuota charges an estimate of handler usage time up front
and then corrects it when the request closes. The correction was computed
as estimate - actual, but RateLimiter.consume() subtracts a positive
amount, so each request was charged about 2 * estimate - actual instead of
actual. The estimate scales with the RegionServer's total request rate, so
a high-volume caller doing many fast requests can exhaust a
HANDLER_USAGE_TIME_MS throttle that is far above its real handler usage
and get RequestHandlerUsageTimeExceeded. The correction is now
actual - estimate, matching how the read and write paths work.

Includes the follow-up HBASE-29793, which repairs TestDefaultHandlerUsageQuota
after this change.

Source:
- HBASE-29771: https://issues.apache.org/jira/browse/HBASE-29771
  (cherry-picked from branch-2.6 d890fca)
- HBASE-29793: https://issues.apache.org/jira/browse/HBASE-29793
  (cherry-picked from branch-2.6 e20e841)

Both are released in 2.6.5, so this commit can be dropped when hubspot-2.6
moves to 2.6.5 or later.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant