[
https://issues.apache.org/jira/browse/CASSANDRA-6975?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13998784#comment-13998784
]
Sylvain Lebresne commented on CASSANDRA-6975:
---------------------------------------------
I'm good with adding QueryOptions to executeInternal so we can use prepared
statements internally. For paging though, we do should use it internally, but
I'm not sure using the paging state from the QueryOptions is really convenient
when we can just use the QueryPager directly. Which is partly why I'm not a
huge fan of the SelectStatement refactor: I'm not convinced adding the
AbstractExecutionContext really simplify thing, it feels more like abstraction
clutter to me.
Also, I'd rather use this ticket to go a little further and actually use
prepared statement internally, otherwise it's not too interesting.
So anyway, I've pushed a branch
[here|https://github.com/pcmanus/cassandra/commits/6975] with 3 commits. The
first one does basically the same than the attached patch but rebased and with
a simpler solution for SelectStatement (and without the unwelcome moves of
imports :)). The 2nd one actually adds convenience calls to prepare and
execute statement internally (including one that pages transparently) and the
3rd one simply use those new calls all over the place.
The paging call is currently unused. We should probably use it for the
BatchlogManager and HintedHandoff but 1) the BatchlogManager does a bunch of
work per-page (waiting for batch futures and deleting) that may or may not make
sense to move at the end of all processing so I'll leave that to someone more
familiar with that code, and 2) HintedHandoff don't use executeInternal in the
first place so that also probably goes outside the scope of this ticket.
> Allow usage of QueryOptions in CQLStatement.executeInternal
> -----------------------------------------------------------
>
> Key: CASSANDRA-6975
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6975
> Project: Cassandra
> Issue Type: Improvement
> Reporter: Mikhail Stepura
> Assignee: Mikhail Stepura
> Priority: Minor
> Fix For: 2.1 rc1
>
> Attachments: cassandra-2.1-executeInternal.patch
>
>
> The current implementations of {{CQLStatement.executeInternal}} accept only
> {{QueryState}} as a parameter. That means it's impossible to use prepared
> statements with variables for internal calls (you can only pass the variables
> via {{QueryOptions}}). We also can't use the internal paging in internal
> "SELECT" statements for the very same reason.
> I'm attaching the patch which implements that.
> [~slebresne] [~iamaleksey] what do you think guys?
--
This message was sent by Atlassian JIRA
(v6.2#6252)