cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aleksey Yeschenko (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-4415) Add cursor API/auto paging to the native CQL protocol
Date Fri, 21 Jun 2013 22:52:25 GMT

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

Aleksey Yeschenko commented on CASSANDRA-4415:
----------------------------------------------

Mostly LGTM. So far a couple issues and some nits:
- native proto spec: section 7 mentions BATCH supporting <result_page_size>
- CassandraServer.get_count() calculates pageSize, but never actually passes it to QueryPagers.pageQuery()
- always passes COUNT_PAGE_SIZE instead
- QueryPagers.pageQuery() in computeNext() doesn't handle pager.fetchPage(pageSize) returning
an empty collection and throws NPE in the next line

I think some other iterator code has similar issues, and count is slightly broken (I had AQP.firstName()
throw NPE, too)

These are the two tests that are broken (test/system/test_thrift_server.py):
1. TestMutations.test_count
2. TestMutations.test_count_around_page_size

And some nits:
- native proto spec: 4.1.4 QUERY 'The body message must be:' summary-line does not include
<result_page_size>
- AbstractQueryPager.discardLast() creates an iterator that's never used (Iterator<Column>
iter = cf.iterator();)
- there are redundantly specialized Collections.<Inferrable>emptyList() calls (in AbstractQueryPager.fetchPage(),
others)
                
> Add cursor API/auto paging to the native CQL protocol
> -----------------------------------------------------
>
>                 Key: CASSANDRA-4415
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4415
>             Project: Cassandra
>          Issue Type: New Feature
>    Affects Versions: 1.2.0 beta 1
>            Reporter: Sylvain Lebresne
>            Assignee: Sylvain Lebresne
>              Labels: cql, protocol
>             Fix For: 2.0 beta 1
>
>
> The goal here would be to use a query paging mechanism to the CQL native protocol. Typically
the client/server with that would look something like this:
> {noformat}
> C sends query to S.
> S sends N first rows matching the query + flag saying the response is not complete
> C requests the next N rows
> S sends N next rows + flag saying whether there is more
> C requests the next N rows
> ...
> S sends last rows + flag saying there is no more result
> {noformat}
> The clear goal is for user to not have to worry about limiting queries and doing manual
paging.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message