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

Eshcar Hillel commented on HBASE-16156:
---------------------------------------

Yes, we mis-placed the CAS of the atomic boolean.
So now (as Anastasia suggested) setting it while checking if we should flush 
ensures that the active is pushed to the pipeline only once *and* the 
compaction is done by a single thread.
This should solve both unnecessary flushes of active segments to pipeline 
(HBASE-16162) as well as contention on the updates lock by multiple threads 
(current Jira).
Also note that the atomic boolean is also set to true (without a CAS) after 
pushing the active to the pipeline and before compaction - this is needed for 
the test to work; in the normal flow this is done by the single thread 
executing this code - the same thread that applied the CAS successfully. 

> In write heavy scenario creating in memory flushes leads to contention
> ----------------------------------------------------------------------
>
>                 Key: HBASE-16156
>                 URL: https://issues.apache.org/jira/browse/HBASE-16156
>             Project: HBase
>          Issue Type: Sub-task
>    Affects Versions: 2.0.0
>            Reporter: ramkrishna.s.vasudevan
>            Assignee: ramkrishna.s.vasudevan
>             Fix For: 2.0.0
>
>
> In write heavy cases, the inmemory flushes blocks the write because it takes 
> a update lock. Dumps show that it is causing heavy contention and leads to 
> memstore filling up and so intern blocks the flush from happening sooner. 
> This JIRA is to discuss optimal settings and then make suitable changes.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to