You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Ravikumar Govindarajan <ra...@gmail.com> on 2013/02/01 13:01:11 UTC
Possible issue in IndexedSliceReader.java ?
The issue is described at the bottom. Pinging user-list since am not sure
how to confirm this bug
*SimpleBlockFetcher.java*, constructor
for (int i = 0; i < columns; i++)
{
OnDiskAtom column =
atomSerializer.deserializeFromSSTable(file, sstable.descriptor.version);
// col is before slice
// (If in slice, don't bother checking that until we change
slice)
if (!inSlice && isColumnBeforeSliceStart(column))
continue;
// col is within slice
if (isColumnBeforeSliceFinish(column))
{
inSlice = true;
addColumn(column);
}
else
{
inSlice = false;
if (!setNextSlice())
{
break;
}
/**
We have moved to the next slice here. But the
current "column" is not checked against the next slice.
Ex: my ColumnSlices are [a-c], [d-f] and I search
for [e] and the current "column" = [e].
In-fact it need not be just next slice. It could
be any arbitrary slice that might match the current "column"
**/
}
--
Ravi
Re: Possible issue in IndexedSliceReader.java ?
Posted by aaron morton <aa...@thelastpickle.com>.
What version are you looking at ?
I *think* it should be testing against the start of the next slice. It should not have to test any more as per the comments at the top of IndexedSliceReader, the slices are ordered. (I'm not sure if slices can overlap though)
The best way I can think to exercise that code is create a CQL 3 table with a list column, add some elements to it and then delete the column. That should trigger a multi range read, see the code in DeleteStatement.
Good catch, can you raise a ticket if you find a problem ?
Thanks
-----------------
Aaron Morton
Freelance Cassandra Developer
New Zealand
@aaronmorton
http://www.thelastpickle.com
On 2/02/2013, at 1:01 AM, Ravikumar Govindarajan <ra...@gmail.com> wrote:
> The issue is described at the bottom. Pinging user-list since am not sure how to confirm this bug
>
> SimpleBlockFetcher.java, constructor
>
> for (int i = 0; i < columns; i++)
> {
> OnDiskAtom column = atomSerializer.deserializeFromSSTable(file, sstable.descriptor.version);
>
> // col is before slice
> // (If in slice, don't bother checking that until we change slice)
> if (!inSlice && isColumnBeforeSliceStart(column))
> continue;
>
> // col is within slice
> if (isColumnBeforeSliceFinish(column))
> {
> inSlice = true;
> addColumn(column);
> }
> else
> {
> inSlice = false;
> if (!setNextSlice())
> {
> break;
> }
> /**
> We have moved to the next slice here. But the current "column" is not checked against the next slice.
> Ex: my ColumnSlices are [a-c], [d-f] and I search for [e] and the current "column" = [e].
>
> In-fact it need not be just next slice. It could be any arbitrary slice that might match the current "column"
> **/
> }
>
> --
> Ravi