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

Tyler Hobbs commented on CASSANDRA-8502:
----------------------------------------

Since I basically had a patch ready to go before this comment, I went ahead and 
attached a 2.0 version of the patch to discuss it.  There are some new 
[dtests|https://github.com/thobbs/cassandra-dtest/tree/CASSANDRA-8502] that 
exercise this pretty well, and the existing unit/dtests seem to be passing.

bq. 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).

Yeah, the patch is a little ugly, but it's not terrible.  In the reversed case, 
the split happens at {{SliceFromReadCommand.getRow()}} instead of at the paging 
level.  Checking for statics basically involves seeing if the table has static 
columns and seeing if the slice start/finish (depending on reversal) is 
EMPTY_BYTE_BUFFER.  IMO, the related changes to trimming the results (to avoid 
trimming or counting statics) are uglier.

bq. 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.

A ~2x penalty isn't _too_ bad, and at least it only significantly affects 
reversed queries on tables with static columns, which should be somewhat rare.  
The fact that we have plans to improve this in 3.0 also helps.

> 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: 8502-2.0.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