[
https://issues.apache.org/jira/browse/HBASE-6900?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13466187#comment-13466187
]
ramkrishna.s.vasudevan commented on HBASE-6900:
-----------------------------------------------
{code}
2012-09-29 17:02:10,765 INFO [main] regionserver.HStore(1045): Completed major
compaction of 1 file(s) in family of
testToShowNPEOnRegionScannerReseek,,1348918329648.73944279562b7d512a9f318cc90098d2.
into 279f1073e9ba4e6db93d93eab86258cf, size=782.0; total size for store is
782.0
java.lang.NullPointerException
at
org.apache.hadoop.hbase.regionserver.StoreScanner.reseek(StoreScanner.java:569)
at
org.apache.hadoop.hbase.regionserver.NonLazyKeyValueScanner.doRealSeek(NonLazyKeyValueScanner.java:55)
at
org.apache.hadoop.hbase.regionserver.NonLazyKeyValueScanner.requestSeek(NonLazyKeyValueScanner.java:39)
at
org.apache.hadoop.hbase.regionserver.KeyValueHeap.generalizedSeek(KeyValueHeap.java:319)
at
org.apache.hadoop.hbase.regionserver.KeyValueHeap.requestSeek(KeyValueHeap.java:278)
at
org.apache.hadoop.hbase.regionserver.HRegion$RegionScannerImpl.reseek(HRegion.java:3588)
at
org.apache.hadoop.hbase.regionserver.TestHRegion.testToShowNPEOnRegionScannerReseek(TestHRegion.java:232)
{code}
> RegionScanner.reseek() creates NPE when a flush or compaction happens before
> the reseek.
> ----------------------------------------------------------------------------------------
>
> Key: HBASE-6900
> URL: https://issues.apache.org/jira/browse/HBASE-6900
> Project: HBase
> Issue Type: Bug
> Reporter: ramkrishna.s.vasudevan
> Assignee: ramkrishna.s.vasudevan
> Attachments: HBASE-6900.patch
>
>
> HBASE-5520 introduced reseek() on the RegionScanner.
> Now when a scanner is created we have the StoreScanner heap. After this if a
> flush or compaction happens parallely all the StoreScannerObservers are
> cleared so that whenever a new next() call happens we tend to recreate the
> scanner based on the latest store files.
> The reseek() in StoreScanner expects the heap not to be null because always
> reseek would be called from next()
> {code}
> public synchronized boolean reseek(KeyValue kv) throws IOException {
> //Heap cannot be null, because this is only called from next() which
> //guarantees that heap will never be null before this call.
> if (explicitColumnQuery && lazySeekEnabledGlobally) {
> return heap.requestSeek(kv, true, useRowColBloom);
> } else {
> return heap.reseek(kv);
> }
> }
> {code}
> Now when we call RegionScanner.reseek() directly using CPs we tend to get a
> NPE. In our case it happened when a major compaction was going on. I will
> also attach a testcase to show the problem.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira