You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "Ray Mattingly (Jira)" <ji...@apache.org> on 2026/10/10 14:20:00 UTC

[jira] [Resolved] (HBASE-30467) Scanner close requests should be exempt from quotas

     [ https://issues.apache.org/jira/browse/HBASE-30467?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ray Mattingly resolved HBASE-30467.
-----------------------------------
    Fix Version/s: 4.0.0-alpha-1
                   2.7.0
                   3.1.0
                   3.0.1
                   2.6.8
     Release Note: Scanner close requests are now exempt from throttling.
       Resolution: Fixed

Backported to 2.6.8. Thank you again for the contribution [~mazhengxuan]!

> Scanner close requests should be exempt from quotas
> ---------------------------------------------------
>
>                 Key: HBASE-30467
>                 URL: https://issues.apache.org/jira/browse/HBASE-30467
>             Project: HBase
>          Issue Type: Improvement
>    Affects Versions: 2.6.3
>            Reporter: Ray Mattingly
>            Assignee: mazhengxuan
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 4.0.0-alpha-1, 2.7.0, 3.1.0, 3.0.1, 2.6.8
>
>
> h2. Summary
> Scanner close requests can be throttled by HBase Quotas like any other client RPC. This opens up the door for a worker to accidentally cause server-side memory leaks of scanners when they are hitting their quotas. I observed this phenomenon at my day job on a lightweight fork of 2.6.3, where we run hundreds of HBase clusters and use quotas heavily to ensure quality of service.
> h2. Problem
> When a client is throttled, any close requests are rejected before they're processed. In RSRpcServices.scan(), checkQuotaAndGetRegionScannerContext() calls getRegionScanner() and then RegionServerRpcQuotaManager.checkScanQuota() for any request with a scannerId, including close-only requests (closeScanner=true, numberOfRows=0). DefaultOperationQuota.checkScanQuota() has no exemption, so a throttled user gets RpcThrottlingException and the closeScanner branch is never reached.
> On the client, ScannerCallable.close() sends the close once without retrying and logs "Ignore, probably already closed", then discards the scanner id. The RegionScannerHolder stays in scanners until ScannerListener.leaseExpired() fires after hbase.client.scanner.timeout.period.
> The result is that throttling meant to protect the RS increases RS memory pressure.
> h2. Proposed Fix
> We can just skip quota checks (use NoopOperationQuota) for close-only scan requests in checkQuotaAndGetRegionScannerContext(). A close does no reads, so exempting it can't be used to get around the quota.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)