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

huaxiang sun commented on HBASE-20411:
--------------------------------------

Seems to me that blockSignal in MemStoreFlusher seems is still needed, but the 
sync block can just include 
{code:java}
wakeupFlushThread();
try {
  // we should be able to wait forever, but we've seen a bug where
  // we miss a notify, so put a 5 second bound on it at least.
  blockSignal.wait(5 * 1000);
} catch (InterruptedException ie) {
  LOG.warn("Interrupted while waiting");
  interrupted = true;
}
{code}

This is to avoid the case that reclaimMemStoreMemory() does not wake up flush 
thread and it misses the blockSignal.notifyAll(). In this case, it needs to 
wait for 5 seconds to wake up, which is bad. I will read the code again to 
confirm and will put a patch, thanks.

> Ameliorate MutableSegment synchronize
> -------------------------------------
>
>                 Key: HBASE-20411
>                 URL: https://issues.apache.org/jira/browse/HBASE-20411
>             Project: HBase
>          Issue Type: Bug
>            Reporter: stack
>            Priority: Major
>         Attachments: 2.load.patched.17704.lock.svg, 
> 2.load.patched.2.17704.lock.svg, 2.more.patch.12010.lock.svg, 41901.lock.svg, 
> HBASE-20411-atomiclong-longadder.patch, HBASE-20411.branch-2.0.001.patch, 
> HBASE-20411.branch-2.0.002.patch, HBASE-20411.branch-2.0.003.patch, 
> HBASE-20411.branch-2.0.004.patch, HBASE-20411.branch-2.0.005.patch, 
> HBASE-20411.branch-2.0.006.patch, HBASE-20411.branch-2.0.007.patch
>
>
> This item is migrated from HBASE-20236 so it gets dedicated issue.
> Let me upload evidence that has this synchronize as a stake in our write-time 
> perf. I'll migrate the patch I posted with updates that come of comments 
> posted by [~mdrob] on the HBASE-20236 issue.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to