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

Sylvain Lebresne commented on CASSANDRA-8502:
---------------------------------------------

Right, and this is not limited to paging: any reversed query with a {{LIMIT}} 
might miss the static parts (paging just make it worst in that even queries 
without a limit are problematic).

I also agree that doing 2 reads seems like the only solution outside of 
specializing statics internally. The somewhat good news is that CASSANDRA-8099 
actually does special case statics (for other reasons initially, but this issue 
adds a reason why it's a good idea), so we should be able to do it easily (and 
much more transparently) with a single read in 3.0.

Now, while we can do 2 reads for 2.0/2.1, it bugs me a bit because:
# It'll probably be hacky code-wise, especially in the paging case since the 
pager doesn't have a very good way to know if we're querying statics or not 
(we'd either have to pass that information down as a boolean to the ctor, or 
manually inspect the slices to detect it, both of which are ugly).
# It'll be surprising performance wise. If it's going to be a "I'm doing this 
and it's slow, how come? Oh, yes, don't do that, it does 2 reads internally", 
I'd almost rather not support it.

So the other option we could consider would be to simply refuse reversed slice 
when statics are involved on the ground that we currently don't have a good way 
to do it efficiently. It's certainly not perfect, but users can do 2 queries if 
they really want to as a work-around, and in doing so the performance impact 
would at least be clear upfront.

> 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.3, 2.0.13
>
>         Attachments: 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