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

ryan rawson commented on HBASE-1495:
------------------------------------

I've figured out this bug, and it has been fixed in the guise of HBASE-1520, 
HBASE-1522.

So to outline the problems:
HBASE-1522 would cause the problem whereby a split child would have it's parent 
removed from under it.  

Then we'd go to next() in hfile, this it the code:
      public boolean next() throws IOException {
        if (block == null) {
          throw new IOException("Next called on non-seeked scanner");
        }
        block.position(block.position() + currKeyLen + currValueLen);
        if (block.remaining() <= 0) {
          // load next block
        }

So we'd call block.position(...), and get to the end of the block, thus 
triggering the 'load next block' code.

But at this point, the HDFS code would throw an exception - reading a deleted 
file fails.

But due to HBASE-1520, the scan code would ignore the exception.  

Then, we'd call next() again.  Only this time the block.position() is at the 
end, so attempts to push it forward would throw the InvalidArgumentException 
indicated above.

The fixes are 2 fold:
- don't ignore IOExceptions
- don't delete a split parent if there are children pointing to it.

Both of these have been fixed in other issues.

I am very satisfied that the bug has been nailed to the wall.  Both these bugs 
were committed to trunk.  Please verify if you can and let me know if it's 
fixed.


> IllegalArgumentException in halfhfilereader#next
> ------------------------------------------------
>
>                 Key: HBASE-1495
>                 URL: https://issues.apache.org/jira/browse/HBASE-1495
>             Project: Hadoop HBase
>          Issue Type: Bug
>            Reporter: stack
>            Assignee: stack
>             Fix For: 0.20.0
>
>         Attachments: 1495.patch, HBASE-1495.patch
>
>
> From posix4e up on IRC
> {code}
> #
> 2009-06-07 20:22:33,367 ERROR 
> org.apache.hadoop.hbase.regionserver.CompactSplitThread: Compaction failed 
> for region t3,*******************,1244420117045
> #
> java.lang.IllegalArgumentException
> #
>         at java.nio.Buffer.position(Buffer.java:218)
> #
>         at 
> org.apache.hadoop.hbase.io.hfile.HFile$Reader$Scanner.next(HFile.java:1072)
> #
>         at 
> org.apache.hadoop.hbase.io.HalfHFileReader$1.next(HalfHFileReader.java:108)
> #
>         at 
> org.apache.hadoop.hbase.regionserver.StoreFileScanner.next(StoreFileScanner.java:52)
> #
>         at 
> org.apache.hadoop.hbase.regionserver.KeyValueHeap.next(KeyValueHeap.java:79)
> #
>         at 
> org.apache.hadoop.hbase.regionserver.MinorCompactingStoreScanner.next(MinorCompactingSto
> #
> reScanner.java:101)
> #
>         at org.apache.hadoop.hbase.regionserver.Store.compact(Store.java:849)
> #
>         at org.apache.hadoop.hbase.regionserver.Store.compact(Store.java:714)
> #
>         at 
> org.apache.hadoop.hbase.regionserver.HRegion.compactStores(HRegion.java:766)
> #
>         at 
> org.apache.hadoop.hbase.regionserver.HRegion.compactStores(HRegion.java:723)
> #
>         at 
> org.apache.hadoop.hbase.regionserver.CompactSplitThread.run(CompactSplitThread.java:105)
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to