Daniel Roudnitsky created HBASE-28559:
-----------------------------------------

             Summary: Region quotas: Multi-region merge causes inaccurate 
accounting of region counts
                 Key: HBASE-28559
                 URL: https://issues.apache.org/jira/browse/HBASE-28559
             Project: HBase
          Issue Type: Bug
          Components: Quotas
    Affects Versions: 3.0.0-beta-2
            Reporter: Daniel Roudnitsky
            Assignee: Daniel Roudnitsky


There is support for merging more than two regions in one merge procedure with 
multi-region merge, but if region quotas are enabled, [NamespaceAuditor assumes 
that every merge is a two region 
merge|https://github.com/apache/hbase/blob/branch-3/hbase-server/src/main/java/org/apache/hadoop/hbase/namespace/NamespaceAuditor.java#L128-L129].
 This causes an inaccurate in memory accounting of region counts in 
NamespaceStateManager, leading MasterQuotaManager to believe there are more 
regions than actually exist if multi-region merge is used. 

To demonstrate the issue:
1. Start with a table with 3 regions in a namespace with a region quota limit 
of 3
2. Merge all 3 regions leaving 1 region, NamespaceAuditor assumed it was a 2 
region merge and believes the number of regions to be 2.
3. Split a region, number of regions is now 2, and NamespaceAuditor believe it 
to be 3.
4. Attempt another region split, which will fail because NamespaceAuditor 
believes the ns to be at its region limit of 3 when there are actually only 2 
regions. 



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

Reply via email to