You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Pavel Yaskevich (JIRA)" <ji...@apache.org> on 2011/03/02 18:52:36 UTC
[jira] Commented: (CASSANDRA-2256) BRAF assertion error
[ https://issues.apache.org/jira/browse/CASSANDRA-2256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13001502#comment-13001502 ]
Pavel Yaskevich commented on CASSANDRA-2256:
--------------------------------------------
Test for the problem:
{code}
public void testAssertOnRead() throws IOException
{
BufferedRandomAccessFile file = createTempFile("braf");
file.write(new byte[10]);
file.sync();
BufferedRandomAccessFile copy = new BufferedRandomAccessFile(file.getPath(), "r");
copy.seek(15);
copy.read();
file.close();
copy.close();
}
{code}
This happens when you are trying to seek to position > file length on read-only file and then read (because fileLength is cached, method isEOF() does not work properly). I don't think that we should allow such seeks.
> BRAF assertion error
> --------------------
>
> Key: CASSANDRA-2256
> URL: https://issues.apache.org/jira/browse/CASSANDRA-2256
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Affects Versions: 0.7.3
> Reporter: Jonathan Ellis
> Assignee: Pavel Yaskevich
> Fix For: 0.7.4
>
>
> While investigating CASSANDRA-2240 I ran into this:
> {noformat}
> java.lang.AssertionError
> at org.apache.cassandra.io.util.BufferedRandomAccessFile.read(BufferedRandomAccessFile.java\
> :230)
> at java.io.RandomAccessFile.readByte(RandomAccessFile.java:589)
> at org.apache.cassandra.utils.ByteBufferUtil.readShortLength(ByteBufferUtil.java:273)
> at org.apache.cassandra.utils.ByteBufferUtil.readWithShortLength(ByteBufferUtil.java:284)
> at org.apache.cassandra.db.CompactionManager.doScrub(CompactionManager.java:539)
> {noformat}
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira