I think it is a bug. According to the comment above, they just want to put
system compactions(selectNow == false) to the small pool, so the code
should like this

ThreadPoolExecutor pool;
if (selectNow) {
  pool = s.throttleCompaction(compaction.getRequest().getSize())
? longCompactions : shortCompactions;
} else {
  pool = shortCompactions;
}

My code is on master so ignore the variable name differences...

Would you mind open a issue on jira?

Thanks.

2015-04-21 21:10 GMT+08:00 zhou_shuaif...@sina.com <zhou_shuaif...@sina.com>
:

> Hi all,
>
> In compactsplitthread.java, the requestCompactionInternal method is like
> this:
>
>   private synchronized CompactionRequest requestCompactionInternal(final
> HRegion r, final Store s,
> ...
>
>     ThreadPoolExecutor pool = (!selectNow && s.throttleCompaction(size))
>       ? largeCompactions : smallCompactions;
>
> ...
>
> this will cause all compactions with selectNow =true go to the small
> compaction queue, even the size is large enough, is it reasonable?
>
> I checked the commit history, this comes from HBASE-8665, is there any
> reason or a bug?
>
> thanks.
>
>
> zhou_shuaif...@sina.com
>

Reply via email to