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

Anoop Sam John commented on HBASE-23968:
----------------------------------------

Ya it might be sleeping for longer duration if the throughput controller 
throttled it.  I have seen it sleeps for long time.
Going through the RS shutdown flow,   seems we will not interrupt the running 
compaction threads at 1st stage.  Later when it call join on these thread and 
not able to complete that within a time out, it will do shutdownNow() which 
will interrupt the thread (sleep also).  Then we just give up wrt compaction. 
There wont be any further close check also.
Any further optimisation, we can open up new jira.


> Periodically check whether a system stop is requested in compaction by time.
> ----------------------------------------------------------------------------
>
>                 Key: HBASE-23968
>                 URL: https://issues.apache.org/jira/browse/HBASE-23968
>             Project: HBase
>          Issue Type: Improvement
>          Components: Compaction
>            Reporter: Minwoo Kang
>            Assignee: Minwoo Kang
>            Priority: Minor
>             Fix For: 3.0.0-alpha-1
>
>
> The compaction check that the system is stopped when it reaches 
> hbase.hstore.close.check.interval size.
> If the size is not reached, the compaction does not stop even though the 
> system is stopped.
> If compaction is not terminated, the region is not closed.
> As a result, region remains pending-close.
>  
> Thread A (regionserver/longCompactions):
> State: RUNNABLE
> Stack:
> org.apache.hadoop.hbase.regionserver.compactions.Compactor.performCompaction(Compactor.java:319)
> org.apache.hadoop.hbase.regionserver.compactions.DefaultCompactor.compact(DefaultCompactor.java:111)
> org.apache.hadoop.hbase.regionserver.DefaultStoreEngine$DefaultCompactionContext.compact(DefaultStoreEngine.java:119)
> org.apache.hadoop.hbase.regionserver.HStore.compact(HStore.java:1232)
> org.apache.hadoop.hbase.regionserver.HRegion.compact(HRegion.java:1896)
> org.apache.hadoop.hbase.regionserver.CompactSplitThread$CompactionRunner.doCompaction(CompactSplitThread.java:525)
> org.apache.hadoop.hbase.regionserver.CompactSplitThread$CompactionRunner.run(CompactSplitThread.java:562)
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> java.lang.Thread.run(Thread.java:748)
> Thread B (RS_CLOSE_REGION):
> State: WAITING
> Waiting on org.apache.hadoop.hbase.regionserver.HRegion$WriteState
> Stack:
> java.lang.Object.wait(Native Method)
> java.lang.Object.wait(Object.java:502)
> org.apache.hadoop.hbase.regionserver.HRegion.waitForFlushesAndCompactions(HRegion.java:1567)
> org.apache.hadoop.hbase.regionserver.HRegion.doClose(HRegion.java:1417)
> org.apache.hadoop.hbase.regionserver.HRegion.close(HRegion.java:1380)
> org.apache.hadoop.hbase.regionserver.handler.CloseRegionHandler.process(CloseRegionHandler.java:138)
> org.apache.hadoop.hbase.executor.EventHandler.run(EventHandler.java:129)
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> java.lang.Thread.run(Thread.java:748)
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to