You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Sandeep Tamhankar (JIRA)" <ji...@apache.org> on 2016/08/30 20:35:20 UTC
[jira] [Created] (CASSANDRA-12574) Make connections state-less; do
not bind a keyspace to the connection
Sandeep Tamhankar created CASSANDRA-12574:
---------------------------------------------
Summary: Make connections state-less; do not bind a keyspace to the connection
Key: CASSANDRA-12574
URL: https://issues.apache.org/jira/browse/CASSANDRA-12574
Project: Cassandra
Issue Type: Improvement
Components: Core
Reporter: Sandeep Tamhankar
Currently, when a client does a "USE <keyspace>", the connection is bound to that keyspace. If an application interacts with multiple keyspaces, it must create a new connection for each keyspace if it wants to continue to use un-qualified cql. This is particularly onerous on "gateway" apps like DataStax Studio, which act on behalf of many users and currently have to open many connections. This is also an annoyance to driver developers.
Proposal:
* Support a keyspace argument in the custom payload of cql requests. Since custom payloads are already supported in the wire protocol as of v4, no protocol change is needed.
* This value, if present, takes precedence over the keyspace bound to the connection (if present).
C* Drivers, which currently issue "USE <ks>" statements when creating a session would now just store the desired default ks and when issuing requests, supply the desired keyspace in the custom payload.
The net effect is that the drivers no longer need to create separate connection pools for different sessions. Also, because the feature doesn't involve a protocol change, it can be implemented in the next 3.x release as well as 2.x, so users who aren't ready to upgrade to 3.x yet can still benefit.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)