You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jonathan Ellis (JIRA)" <ji...@apache.org> on 2011/02/24 20:00:38 UTC

[jira] Updated: (CASSANDRA-2241) BRAF read can loop infinitely instead of detecting EOF

     [ https://issues.apache.org/jira/browse/CASSANDRA-2241?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis updated CASSANDRA-2241:
--------------------------------------

    Attachment: 2241.txt

Adds tests for this problem and similar ones around EOF behavior.

Fixes bug and makes some changes to make BRAF more straightforward:

- ByteBuffer buffer -> byte[] (no more confusion between "current" and buffer's internal markers)

- Instead of bufferEnd (easy to confuse with bufferOffset + buffer.length), use validBufferBytes

- removes hitEOF

- gives read() the behavior of readAtMost(), which was the behavior read() is *supposed* to have

- avoid allocating new byte[1] for each call to write(int)

- adds asserts for expected internal state

- fixes length() when we seek to an earlier position that is still inside the current buffer

> BRAF read can loop infinitely instead of detecting EOF
> ------------------------------------------------------
>
>                 Key: CASSANDRA-2241
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2241
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 0.7.1
>            Reporter: Jonathan Ellis
>            Assignee: Jonathan Ellis
>            Priority: Minor
>             Fix For: 0.7.3
>
>         Attachments: 2241.txt
>
>
> (marking this Minor since normally we never try to read past the end of an SSTable, but CASSANDRA-2240 is running into it.)

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira