cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Shaw (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-4693) CQL Protocol should allow multiple PreparedStatements to be atomically executed
Date Fri, 21 Dec 2012 17:51:13 GMT

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

Rick Shaw commented on CASSANDRA-4693:
--------------------------------------

The JDBC spec has a well tested solution to this problem. The subject is covered in section
14.1.4 : "PreparedStatement Objects" under "Batch Updates". It is probably worth a look.

The summary is that it makes a list of prepared statement entries and their associated parameters
and keeps it under a controlling statement. A C* implementation might be to create a list
of both the prepared statement token and its list of binding values. Keeping the list of bound
values tightly coupled with each prepared statement token greatly simplifies the binding alignment
when the number of operations is large.
                
> CQL Protocol should allow multiple PreparedStatements to be atomically executed
> -------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-4693
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4693
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Michaël Figuière
>              Labels: cql, protocol
>
> Currently the only way to insert multiple records on the same partition key, atomically
and using PreparedStatements is to use a CQL BATCH command. Unfortunately when doing so the
amount of records to be inserted must be known prior to prepare the statement which is rarely
the case. Thus the only workaround if one want to keep atomicity is currently to use unprepared
statements which send a bulk of CQL strings and is fairly inefficient.
> Therefore CQL Protocol should allow clients to send multiple PreparedStatements to be
executed with similar guarantees and semantic as CQL BATCH command.

--
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