[ 
https://issues.apache.org/jira/browse/HBASE-3969?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13053114#comment-13053114
 ] 

zhoushuaifeng commented on HBASE-3969:
--------------------------------------

Yes St, it's what I mean. Thanks a lot.
But here I think need small change:
{code}
+            } else if (s.isMajorCompaction()) {
+              if (majorCompactPriority == DEFAULT_PRIORITY ) {
+                this.instance.compactSplitThread.requestCompaction(r, s,
{code}
change to like this is better, because if the region have more storefiles, it 
will get higher priority by default than the configured settings, and at this 
situation, it's better to use default priority:
{code}
+            } else if (s.isMajorCompaction()) {
+              if (majorCompactPriority == DEFAULT_PRIORITY || 
+                       majorCompactPriority > r.getCompactPriority()) {
+                this.instance.compactSplitThread.requestCompaction(r, s,
{code}

And may be it's better to set DEFAULT_PRIORITY to max integer, because compact 
priority can be -1 when the store files number equal to blockingStoreFiles+1.
{code}
+    private final static int DEFAULT_PRIORITY = Integer.MAX_VALUE;
{code}


> Outdated data can not be cleaned in time
> ----------------------------------------
>
>                 Key: HBASE-3969
>                 URL: https://issues.apache.org/jira/browse/HBASE-3969
>             Project: HBase
>          Issue Type: Improvement
>          Components: regionserver
>    Affects Versions: 0.90.1, 0.90.2, 0.90.3
>            Reporter: zhoushuaifeng
>             Fix For: 0.90.4
>
>         Attachments: HBASE-3969-solution1-for-branch-v2.patch, 
> HBASE-3969-solution1-for-branch-v3.patch, 
> HBASE-3969-solution1-for-branch.patch, 
> HBASE-3969-solution1-for-trunk-v2.patch, 
> HBASE-3969-solution1-for-trunk-v3.patch, HBASE-3969-solution1.patch
>
>
> Compaction checker will send regions to the compact queue to do compact. But 
> the priority of these regions is too low if these regions have only a few 
> storefiles. When there is large through output, and the compact queue will 
> aways have some regions with higher priority. This may causing the major 
> compact be delayed for a long time(even a few days),  and outdated data 
> cleaning will also be delayed.
> In our test case, we found some regions sent to the queue by major compact 
> checker hunging in the queue for more than 2 days! Some scanners on these 
> regions cannot get availably data for a long time and lease expired.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to