cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tyler Hobbs (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-8502) Static columns returning null for pages after first
Date Wed, 29 Apr 2015 19:32:06 GMT


Tyler Hobbs commented on CASSANDRA-8502:

The attached v2 patches should resolve the issues I was seeing with the dtests.  I pushed
some commits to [my branch|]
that explain the issue, but in summary, I made a couple of errors around replacing DataRange.Paging's
columnFilter.  I also added a new [dtest|]
for the combination of static columns and secondary index queries.

bq.  Saying why using static columns as a start break things doesn't explain why that is,
so I'd to the comment hat the underlying problem is that we query static columns no matter
what the actual filter is, and thus static columns are not a good indicator of where we are
of paging within a partition.

Okay, I've updated the javadoc to mention this as well.

bq. Thing is, paging is stateless. The slices will be recreated multiple times if the start
or end key happens to cover multiple pages with or without this change because the pages may
not even be handled by the same node.

Right, that's not what I was trying to address.  Within a single page {{columnFilter()}} may
be called multiple times for the same key, especially if we're executing a secondary index
query.  As one example, In {{CompositesSearcher}} we do this in the scan iterator's {{computeNext()}}
for every index cell:

if (!filter.columnFilter(dk.getKey()).maySelectPrefix(baseComparator, start))

We could obviously change that, but there are a few other places where {{columnFilter()}}
may get called, as well.

> Static columns returning null for pages after first
> ---------------------------------------------------
>                 Key: CASSANDRA-8502
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Flavien Charlon
>            Assignee: Tyler Hobbs
>             Fix For: 2.1.x, 2.0.x
>         Attachments: 8502-2.0-v2.txt, 8502-2.0.txt, 8502-2.1-v2.txt, null-static-column.txt
> When paging is used for a query containing a static column, the first page contains the
right value for the static column, but subsequent pages have null null for the static column
instead of the expected value.
> Repro steps:
> - Create a table with a static column
> - Create a partition with 500 cells
> - Using cqlsh, query that partition
> Actual result:
> - You will see that first, the static column appears as expected, but if you press a
key after "---MORE---", the static columns will appear as null.
> See the attached file for a repro of the output.
> I am using a single node cluster.

This message was sent by Atlassian JIRA

View raw message