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

Duo Zhang commented on HBASE-20704:
-----------------------------------

Another problem introduced by this patch...
The problem described here does exist, but the approach maybe questionable...
{noformat}
2019-02-19,15:02:41,686 WARN org.apache.hadoop.hbase.master.MasterRpcServices: 
c4-hadoop-tst-st27.bj,29100,1550549565996 reported a fatal error:
***** ABORTING region server c4-hadoop-tst-st27.bj,29100,1550549565996: Failed 
to close region fa5643dcf51854e326cae5786d5a9898 and can not recover *****
Cause:
java.io.IOException: java.lang.IllegalStateException: There are still 
streamReaders post close: 1
        at org.apache.hadoop.hbase.regionserver.HStore.close(HStore.java:968)
        at 
org.apache.hadoop.hbase.regionserver.HRegion$2.call(HRegion.java:1661)
        at 
org.apache.hadoop.hbase.regionserver.HRegion$2.call(HRegion.java:1658)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalStateException: There are still streamReaders post 
close: 1
        at 
org.apache.hbase.thirdparty.com.google.common.base.Preconditions.checkState(Preconditions.java:456)
        at 
org.apache.hadoop.hbase.regionserver.HStoreFile.closeStreamReaders(HStoreFile.java:555)
        at 
org.apache.hadoop.hbase.regionserver.HStoreFile.closeStoreFile(HStoreFile.java:545)
        at org.apache.hadoop.hbase.regionserver.HStore$1.call(HStore.java:950)
        at org.apache.hadoop.hbase.regionserver.HStore$1.call(HStore.java:945)
        ... 6 more
{noformat}

> Sometimes some compacted storefiles are not archived on region close
> --------------------------------------------------------------------
>
>                 Key: HBASE-20704
>                 URL: https://issues.apache.org/jira/browse/HBASE-20704
>             Project: HBase
>          Issue Type: Bug
>          Components: Compaction
>    Affects Versions: 3.0.0, 1.3.0, 1.4.0, 1.5.0, 2.0.0
>            Reporter: Francis Liu
>            Assignee: Francis Liu
>            Priority: Critical
>             Fix For: 3.0.0, 1.3.3, 2.2.0, 1.4.8, 2.1.1, 2.0.3
>
>         Attachments: HBASE-20704-addendum.patch, 
> HBASE-20704-branch-1.002.patch, HBASE-20704.001.patch, HBASE-20704.002.patch, 
> HBASE-20704.003.patch, HBASE-20704.004.draft.patch, HBASE-20704.005.patch, 
> HBASE-20704.006.patch, HBASE-20704.007.patch, HBASE-20704.branch-1.001.patch
>
>
> During region close compacted files which have not yet been archived by the 
> discharger are archived as part of the region closing process. It is 
> important that these files are wholly archived to insure data consistency. ie 
> a storefile containing delete tombstones can be archived while older 
> storefiles containing cells that were supposed to be deleted are left 
> unarchived thereby undeleting those cells. 
> On region close a compacted storefile is skipped from archiving if it has 
> read references (ie open scanners). This behavior is correct for when the 
> discharger chore runs but on region close consistency is of course more 
> important so we should add a special case to ignore any references on the 
> storefile and go ahead and archive it. 
> Attached patch contains a unit test that reproduces the problem and the 
> proposed fix.



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

Reply via email to