Skip to content

HBASE-29936 RegionServerRpcQuotaManager throws NPE in checkScanQuota and checkBatchQuota when quotaCache is null#7815

Open
dParikesit wants to merge 3 commits intoapache:masterfrom
dParikesit:2-RegionServerRpcQuotaManager-NPE
Open

HBASE-29936 RegionServerRpcQuotaManager throws NPE in checkScanQuota and checkBatchQuota when quotaCache is null#7815
dParikesit wants to merge 3 commits intoapache:masterfrom
dParikesit:2-RegionServerRpcQuotaManager-NPE

Conversation

@dParikesit
Copy link
Contributor

Jira: HBASE-29936

When a RpcThrottlingException is raised during checkScanQuota or checkBatchQuota, the error handler always calls quotaCache.getQuotaUserName(ugi). If quota is disabled (hbase.quota.enabled: false), quotaCache will be null, so the exception handler itself throws NullPointerException. This masks the original RpcThrottlingException and can break RPC handling when quotas are disabled or not yet initialized.

We propose to add isQuotaEnabled() check in the exception handling and use ugi.getUserName() if the quota is disabled.

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.

2 participants