You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Michael Dürig (JIRA)" <ji...@apache.org> on 2016/05/09 14:54:12 UTC

[jira] [Commented] (OAK-4353) IndexOutOfBoundsException in FileStore.writeStream

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

Michael Dürig commented on OAK-4353:
------------------------------------

It seems this has been introduced with http://svn.apache.org/viewvc?view=revision&revision=1740103 where the gc generation is written in the tar index. Bulk segments don't have generations but the code does try to read the generation from such segments anyway. If the trailing bulk segment of a stream is too small, accessing the location where the GC generation is stored (in data segments) leads to this exception. 

Will provide a test case shortly. 

> IndexOutOfBoundsException in FileStore.writeStream
> --------------------------------------------------
>
>                 Key: OAK-4353
>                 URL: https://issues.apache.org/jira/browse/OAK-4353
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: segment-tar
>            Reporter: Michael Dürig
>            Assignee: Michael Dürig
>             Fix For: 1.6
>
>
> When writing streams of specific length I get 
> {code}
> java.lang.IndexOutOfBoundsException
> at java.nio.Buffer.checkIndex(Buffer.java:538)
> at java.nio.HeapByteBuffer.getInt(HeapByteBuffer.java:359)
> at org.apache.jackrabbit.oak.segment.Segment.getGcGen(Segment.java:318)
> at org.apache.jackrabbit.oak.segment.file.FileStore.writeSegment(FileStore.java:1371)
> at org.apache.jackrabbit.oak.segment.SegmentWriter$SegmentWriteOperation.internalWriteStream(SegmentWriter.java:661)
> {code}



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