[jira] [Commented] (CASSANDRA-4693) CQL Protocol should allow multiple PreparedStatements to be atomically executed

2013-05-27 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-4693:
-

Committed with the point above fixed. Thanks!

 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
Assignee: Sylvain Lebresne
  Labels: cql, protocol
 Fix For: 2.0

 Attachments: 
 0001-Binary-protocol-adds-message-to-batch-prepared-or-not-.txt


 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


[jira] [Commented] (CASSANDRA-4693) CQL Protocol should allow multiple PreparedStatements to be atomically executed

2013-05-24 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-4693:
--

Can't get it to build - two execute() methods in BatchStatement with the same 
erasure :(

 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
Assignee: Sylvain Lebresne
  Labels: cql, protocol
 Fix For: 2.0

 Attachments: 
 0001-Binary-protocol-adds-message-to-batch-prepared-or-not-.txt


 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


[jira] [Commented] (CASSANDRA-4693) CQL Protocol should allow multiple PreparedStatements to be atomically executed

2013-05-24 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-4693:
--

- 4.1.9 BATCH section number is wrong - should be 4.1.7
- QueryProcessor.processBatch() should call checkAccess() first, then 
validate() - to avoid leaking info on keyspace/tables existence to 
unauthenticated users
- BatchMessage.toType() has an error: 2 should map to COUNTER, not to UNLOGGED

Other than that LGTM

 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
Assignee: Sylvain Lebresne
  Labels: cql, protocol
 Fix For: 2.0

 Attachments: 
 0001-Binary-protocol-adds-message-to-batch-prepared-or-not-.txt


 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


[jira] [Commented] (CASSANDRA-4693) CQL Protocol should allow multiple PreparedStatements to be atomically executed

2013-05-21 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-4693:
--

Could you rebase? It no longer applies because of trigger changes to 
BatchStatement.

 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
Assignee: Sylvain Lebresne
  Labels: cql, protocol
 Fix For: 2.0

 Attachments: 
 0001-Binary-protocol-adds-message-to-batch-prepared-or-not-.txt


 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


[jira] [Commented] (CASSANDRA-4693) CQL Protocol should allow multiple PreparedStatements to be atomically executed

2013-03-12 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-4693:
---

We're only talking about updates here, right?  Not returning multiple 
resultsets?

 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
 Fix For: 2.0


 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


[jira] [Commented] (CASSANDRA-4693) CQL Protocol should allow multiple PreparedStatements to be atomically executed

2013-03-12 Thread JIRA

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

Michaël Figuière commented on CASSANDRA-4693:
-

Right. This feature is mostly about bringing atomic batch guarantees to set of 
PreparedStatements of any size. There will probably be some performance 
improvement in executing them in batch but it'll be small as the Binary 
Protocol is able to pipeline requests. So for read requests, not only returning 
multiple resultsets would be an unusual thing, it would also be unnecessary as 
there's no interesting guarantees to get there.

 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
 Fix For: 2.0


 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


[jira] [Commented] (CASSANDRA-4693) CQL Protocol should allow multiple PreparedStatements to be atomically executed

2012-12-21 Thread Rick Shaw (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-4693?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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


[jira] [Commented] (CASSANDRA-4693) CQL Protocol should allow multiple PreparedStatements to be atomically executed

2012-12-20 Thread JIRA

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

Michaël Figuière commented on CASSANDRA-4693:
-

Considering the key role of Batches in CQL3, it would actually be very 
interesting to allow clients to send a list of both prepared and un-prepared 
statements to be executed with the same semantic and guarantees of a BATCH 
command. This would allow applications developers / frameworks to prepare most 
of their queries and include an additional one that is generated at runtime. An 
example of a use case that would leverage such is feature is when a bunch of 
columns need to be saved along with a set of complex collection mutations.

 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


[jira] [Commented] (CASSANDRA-4693) CQL Protocol should allow multiple PreparedStatements to be atomically executed

2012-09-20 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-4693:
-

One way to allow that would be to allow for the executePrepared message of the 
protocol to take a list of (preparedId, values) instead of just one (we would 
obviously refuse the query if the list size is  1 and there is something else 
than a modification statement). Not sure we want to bother with on the 
CQL-over-thrift side however (I don't).

 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