cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylvain Lebresne (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-11963) Paged queries limited to Integer.MAX_VALUE total rows
Date Tue, 07 Jun 2016 17:04:21 GMT

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

Sylvain Lebresne commented on CASSANDRA-11963:
----------------------------------------------

Appears my brain wasn't fully functional on my previous comment. {{PagingState.remaining}}
is about how much row should be returned before hitting your global (query) limit. That is,
if you do {{SELECT ... LIMIT 10000}}, we need to keep track of where we are of that {{10000}}
limit somehow and it can't be reset. Now, the part I brain-farted is that this limit is really
not related to paging, it just happen that we currently use an {{int}} for the query {{LIMIT}}
and thus are limited to {{Integer.MAX_INT}} paging or no paging.

Now, when the use do set a {{LIMIT}}, I don't think the {{Integer.MAX_INT}} limit is a huge
deal, and while we should probably still switch to a {{long}} in the long run (which should
be doable on trunk since "I think" we use vints everywhere it matters), it's probably fine
to keep that limitation in 2.1/2.2. What we should fix though is when users don't {{LIMIT}}
the query. In that case, we currently use {{Integer.MAX_INT}} but don't special case more
than that, which mean we effectively silently limit the query and that's not great. So we
should special case {{Integer.MAX_INT}} in the paging code to really mean no limit and have
it act like so (in which case we can indeed do so in 2.1/2.2 since in that case we'll basically
ignore {{PagingState.remaining}} and can have it be {{Integer.MAX_INT}} on every page). For
3.0 though, we can probably just stick with switching to a {{long}} for the limit and {{PagingState.remaining}}
(assuming I'm not missing a reason why we can't do so). 

> Paged queries limited to Integer.MAX_VALUE total rows
> -----------------------------------------------------
>
>                 Key: CASSANDRA-11963
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-11963
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Adam Holmberg
>            Priority: Minor
>             Fix For: 2.1.x, 2.2.x
>
>
> Paged queries are artificially limited to Integer.MAX_INT rows in total. This appears
to be related to PagingState.remaining, which decrements monotonically as pages are consumed.

> I don't think this is intentional behavior, and haven't found any mention of it in the
docs.
> Issue observed in latest 2.1 and 2.2 releases. Does not occur in 3.x



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message