You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Yu Li (JIRA)" <ji...@apache.org> on 2018/01/08 03:28:00 UTC

[jira] [Comment Edited] (HBASE-19728) Add lock to filesCompacting in all place.

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

Yu Li edited comment on HBASE-19728 at 1/8/18 3:27 AM:
-------------------------------------------------------

+1

Actually there're more places where {{filesCompacting}} is accessed w/o any {{lock.readLock()/writeLock()}} protection such as lines at bottom of the {{compactRecentForTestingAssumingDefaultPolicy}} method.


was (Author: carp84):
+1

Actually there're more places where {{filesCompacting}} is accessed w/o any lock protection such as lines at bottom of the {{compactRecentForTestingAssumingDefaultPolicy}} method.

> Add lock to filesCompacting in all place.
> -----------------------------------------
>
>                 Key: HBASE-19728
>                 URL: https://issues.apache.org/jira/browse/HBASE-19728
>             Project: HBase
>          Issue Type: Bug
>            Reporter: binlijin
>            Assignee: binlijin
>         Attachments: HBASE-19728.master.001.patch
>
>
> We find regionserver abort with the following exception:
> 2017-05-09 17:40:06,369 FATAL [regionserver/hadoop0349.et2.tbsite.net/11.251.152.199:16020-shortCompactions-1493026663275] regionserver.HRegionServer: ABORTING region server hadoop0349.et2.tbsite.net,16020,1493026637177: Thread[regionserver/hadoop0349.et2.tbsite.net/11.251.152.199:16020-shortCompactions-1493026663275,5,main] throw uncaught exception
> java.lang.ArrayIndexOutOfBoundsException
>         at java.lang.System.arraycopy(Native Method)
>         at java.util.ArrayList.batchRemove(ArrayList.java:726)
>         at java.util.ArrayList.removeAll(ArrayList.java:690)
>         at org.apache.hadoop.hbase.regionserver.HStore.finishCompactionRequest(HStore.java:1666)
>         at org.apache.hadoop.hbase.regionserver.HStore.cancelRequestedCompaction(HStore.java:1656)
>         at org.apache.hadoop.hbase.regionserver.CompactSplitThread$CompactionRunner.run(CompactSplitThread.java:504)
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1147)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:622)
>         at java.lang.Thread.run(Thread.java:834)
> 2017-05-08 21:15:31,979 FATAL [regionserver/hadoop1191.et2.tbsite.net/11.251.159.40:16020-longCompactions-1494249331978] regionserver.HRegionServer: ABORTING region server hadoop1191.et2.tbsite.net,16020,1493196567798: Thread[regionserver/hadoop1191.et2.tbsite.net/11.251.159.40:16020-longCompactions-1494249331978,5,main] throw uncaught exception
> java.lang.IllegalArgumentException
>         at com.google.common.base.Preconditions.checkArgument(Preconditions.java:76)
>         at org.apache.hadoop.hbase.regionserver.compactions.RatioBasedCompactionPolicy.getCurrentEligibleFiles(RatioBasedCompactionPolicy.java:64)
>         at org.apache.hadoop.hbase.regionserver.compactions.RatioBasedCompactionPolicy.preSelectCompactionForCoprocessor(RatioBasedCompactionPolicy.java:72)
>         at org.apache.hadoop.hbase.regionserver.DefaultStoreEngine$DefaultCompactionContext.preSelect(DefaultStoreEngine.java:117)
>         at org.apache.hadoop.hbase.regionserver.HStore.requestCompaction(HStore.java:1542)
>         at org.apache.hadoop.hbase.regionserver.CompactSplitThread.selectCompaction(CompactSplitThread.java:362)
>         at org.apache.hadoop.hbase.regionserver.CompactSplitThread.access$200(CompactSplitThread.java:58)
>         at org.apache.hadoop.hbase.regionserver.CompactSplitThread$CompactionRunner.run(CompactSplitThread.java:491)
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1147)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:622)
>         at java.lang.Thread.run(Thread.java:834)
> HStore#finishCompactionRequest do not require any HStore#lock's lock so HStore.replaceStoreFiles need to synchronized on filesCompacting.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)