[ 
https://issues.apache.org/jira/browse/CASSANDRA-6857?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sylvain Lebresne updated CASSANDRA-6857:
----------------------------------------

    Attachment: 6857-2.0-v2.txt

bq. it was a little confusing that the 2.1 patch assumed the 2.0 patch was 
applied

Sorry about that, that was not intentional tbh.

bq. You said the QueryPagers change was an optimization, but it appears to 
affect the correctness.

Yeah, but that's because I forgot something in the initial patch. I modified 
PagedRangeCommand.countCQL3Rows(), but the executeLocally() of the same class 
was ignoring it, having it hardcoded to true basically. Attaching v2 with that 
fixed (only of 2.0, provided we agree on the 2.1 version, I'll just make sure 
to have this including during the merge).

Regarding QueryPagers, the change is in the mayNeedPaging() method. The method 
itself is an optimization, we use it to avoid using the paging code when we 
know we don't have because that's slightly faster, but truly, whether or not 
this method return true should never change correctness, otherwise that means 
we just have a bug in paging (as is the case and my first version wasn't 
complete) and this is hidding it.


> SELECT DISTINCT with a LIMIT is broken by paging
> ------------------------------------------------
>
>                 Key: CASSANDRA-6857
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6857
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Sylvain Lebresne
>            Assignee: Sylvain Lebresne
>             Fix For: 2.0.7
>
>         Attachments: 6857-2.0-v2.txt, 6857-2.0.txt, 6857-2.1.txt
>
>
> The paging for RangeSliceCommand only support the case where we count CQL3 
> rows . However, in the case of SELECT DISTINCT, we do actually want to use 
> the "count partitions, not CQL3 row" path and that's currently broken when 
> the paging commands are used (this was first reported on the [Java driver 
> JIRA|https://datastax-oss.atlassian.net/browse/JAVA-288] and there is a 
> reproduction script there).



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to