[
https://issues.apache.org/jira/browse/CASSANDRA-3798?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sylvain Lebresne updated CASSANDRA-3798:
----------------------------------------
Attachment: 3798.patch
Patch attached against 1.1 (I don't really see a reason to risk back-porting to
1.0).
> get_count paging often asks for a page uselessly
> ------------------------------------------------
>
> Key: CASSANDRA-3798
> URL: https://issues.apache.org/jira/browse/CASSANDRA-3798
> Project: Cassandra
> Issue Type: Improvement
> Affects Versions: 1.0.0
> Reporter: Sylvain Lebresne
> Assignee: Sylvain Lebresne
> Priority: Minor
> Fix For: 1.1
>
> Attachments: 3798.patch
>
>
> Current get_count paging stopping condition is:
> {noformat}
> if ((requestedCount == 0) || ((columns.size() == 1) &&
> (lastName.equals(predicate.slice_range.start))))
> {
> break;
> }
> {noformat}
> On a "count how many columns this row has" query (arguably the main reason
> why you'd use get_count), requestedCount will never be 0, and so we'll stop
> whenever a page has only returned the last column of the preceding page.
> While this isn't wrong, we could stop as soon as a page returns less element
> than requested and avoid querying that last 1 column page.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira