cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Ellis (JIRA)" <>
Subject [jira] Updated: (CASSANDRA-2241) BRAF read can loop infinitely instead of detecting EOF
Date Thu, 24 Feb 2011 19:00:38 GMT


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

- 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

- 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:
>             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:


View raw message