hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-12767) Fix a StoreFileScanner NPE in reverse scan flow
Date Tue, 30 Dec 2014 05:49:13 GMT

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

Hudson commented on HBASE-12767:
--------------------------------

FAILURE: Integrated in HBase-1.0 #618 (See [https://builds.apache.org/job/HBase-1.0/618/])
HBASE-12767 Fix a StoreFileScanner NPE in reverse scan flow (xieliang: rev 92c71413564eecb05d8e8a93044e769d46a17a02)
* hbase-server/src/main/java/org/apache/hadoop/hbase/io/HalfStoreFileReader.java
* hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java


> Fix a StoreFileScanner NPE in reverse scan flow
> -----------------------------------------------
>
>                 Key: HBASE-12767
>                 URL: https://issues.apache.org/jira/browse/HBASE-12767
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver, Scanners
>    Affects Versions: 1.0.0, 2.0.0, 0.98.9
>            Reporter: Liang Xie
>            Assignee: Liang Xie
>             Fix For: 1.0.0, 2.0.0, 0.98.10, 1.1.0
>
>         Attachments: HBASE-12767.txt
>
>
> we observed a NPE in our internal 0.94 branch prd env:
> ERROR org.apache.hadoop.hbase.regionserver.HRegionServer: Failed openScanner
> java.lang.NullPointerException
> at org.apache.hadoop.hbase.regionserver.StoreFileScanner.seekToPreviousRow(StoreFileScanner.java:409)
> at org.apache.hadoop.hbase.regionserver.StoreFileScanner.backwardSeek(StoreFileScanner.java:467)
> at org.apache.hadoop.hbase.regionserver.ReversedStoreScanner.seekScanners(ReversedStoreScanner.java:78)
> at org.apache.hadoop.hbase.regionserver.StoreScanner.<init>(StoreScanner.java:154)
> at org.apache.hadoop.hbase.regionserver.ReversedStoreScanner.<init>(ReversedStoreScanner.java:49)
> at org.apache.hadoop.hbase.regionserver.Store.getScanner(Store.java:2216)
> at org.apache.hadoop.hbase.regionserver.HRegion$RegionScannerImpl.<init>(HRegion.java:3984)
> at org.apache.hadoop.hbase.regionserver.ReversedRegionScannerImpl.<init>(ReversedRegionScannerImpl.java:43)
> at org.apache.hadoop.hbase.regionserver.HRegion.instantiateRegionScanner(HRegion.java:1851)
> at org.apache.hadoop.hbase.regionserver.HRegion.getScanner(HRegion.java:1837)
> at org.apache.hadoop.hbase.regionserver.HRegion.getScanner(HRegion.java:1812)
> at org.apache.hadoop.hbase.regionserver.HRegionServer.internalOpenScanner(HRegionServer.java:2752)
> at org.apache.hadoop.hbase.regionserver.HRegionServer.openScanner(HRegionServer.java:2715)
> After tracing, it turned out a boundary bug at HalfStoreFileReader. If we have a reverse
scan request at "bottom" part, once the start row >= the last row at bottom part, the NPE
will be encourtered, since we will invoke "next()", and "atEnd = true" will be called in HalfStoreFileReader,
then when we want to do "seekBefore" or other sth in StoreFileScanner,  StoreFileScanner.cur
will call:
> {code}
>       public Cell getKeyValue() {
>         if (atEnd) return null;
> {code}
> The fix is simple, we need to reset the "atEnd" flag once seekBefore op is successful.
You can undo my HalfStoreFileReader change and run the new added case to see NPE.
> ps: I also found some cases in TestHRegion missing the "@Test" annotation, so fix them
in the same patch as well.



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

Mime
View raw message