[ 
https://issues.apache.org/jira/browse/CASSANDRA-8502?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14520032#comment-14520032
 ] 

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|https://github.com/apache/cassandra/compare/cassandra-2.0...thobbs:CASSANDRA-8502-2.0?expand=1]
 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|https://github.com/riptano/cassandra-dtest/commit/d94e13e53093deab8acdc720d7003adcb3991b9a]
 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:

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

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: https://issues.apache.org/jira/browse/CASSANDRA-8502
>             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
(v6.3.4#6332)

Reply via email to