Repository navigation
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
Draft
cathturner wants to merge 2 commits into
cathturner wants to merge 2 commits into
Conversation
… 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.