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

Hiroshi Ikeda commented on HBASE-7437:
--------------------------------------

bq. In #1 above you mentioned performance gain. Did you observe such gain in 
your cluster ?

I just mentioned it in general terms, and it might be almost no effect to 
actual performance if a number of threads to invoke CompactSelection is enough 
low. But there is no reason not to use atomic variables.
                
> Improve CompactSelection
> ------------------------
>
>                 Key: HBASE-7437
>                 URL: https://issues.apache.org/jira/browse/HBASE-7437
>             Project: HBase
>          Issue Type: Improvement
>          Components: Compaction
>            Reporter: Hiroshi Ikeda
>            Assignee: Hiroshi Ikeda
>            Priority: Minor
>         Attachments: HBASE-7437.patch
>
>
> 1. Using AtomicLong makes CompactSelection simple and improve its performance.
> 2. There are unused fields and methods.
> 3. The fields should be private.
> 4. Assertion in the method finishRequest seems wrong:
> {code}
>   public void finishRequest() {
>     if (isOffPeakCompaction) {
>       long newValueToLog = -1;
>       synchronized(compactionCountLock) {
>         assert !isOffPeakCompaction : "Double-counting off-peak count for 
> compaction";
> {code}
> The above assertion seems almost always false.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to