[
https://issues.apache.org/jira/browse/CASSANDRA-10145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15966747#comment-15966747
]
Jeff Jirsa commented on CASSANDRA-10145:
----------------------------------------
I know this is closed, but stylistically:
- Rather than change the only constructor for {{PrepareMessage(query)}} to make
{{PrepareMessage(query,keyspace)}} and then pass a null keyspace in from all
over the codebase, can't we make a second constructor so we have both
{{PrepareMessage(query)}} and {{PrepareMessage(query, keyspace)}} ?
- [This
line|https://github.com/apache/cassandra/commit/1f533260a01552790aff0f5f2f8f2f0aee8dbf10#diff-37ea3d4afebe3a5be030c348320b195aR176]
violates the cassandra style guide
- Do we really need a ternary
[here|https://github.com/apache/cassandra/commit/1f533260a01552790aff0f5f2f8f2f0aee8dbf10#diff-a86519011c638439ccfce7ec11445e58R76]
? Why not {{if (keyspace != null) size += CBUtil.sizeOfString(msg.keyspace)}} ?
[~snazy] - do you happen to feel like any of these are worth opening a
follow-up jira to fix (or a ninja for the style fix at least)?
> Change protocol to allow sending key space independent of query string
> ----------------------------------------------------------------------
>
> Key: CASSANDRA-10145
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10145
> Project: Cassandra
> Issue Type: Improvement
> Reporter: Vishy Kasar
> Assignee: Sandeep Tamhankar
> Labels: client-impacting, protocolv5
> Fix For: 4.0
>
> Attachments: 10145-trunk.txt
>
>
> Currently keyspace is either embedded in the query string or set through "use
> keyspace" on a connection by client driver.
> There are practical use cases where client user has query and keyspace
> independently. In order for that scenario to work, they will have to create
> one client session per keyspace or have to resort to some string replace
> hackery.
> It will be nice if protocol allowed sending keyspace separately from the
> query.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)