[ https://issues.apache.org/jira/browse/CASSANDRA-5443?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13657471#comment-13657471 ]
Jonathan Ellis edited comment on CASSANDRA-5443 at 5/14/13 8:29 PM: -------------------------------------------------------------------- The tracing I see suggests that this is actually executing StorageProxy.mutate instead of SP.cas: {noformat} cqlsh:foo> update bar set j=1 where i=1 if not exists; activity | timestamp | source | source_elapsed -----------------------------------+--------------+-----------+---------------- execute_cql3_query | 15:24:50,122 | 127.0.0.1 | 0 Parsing statement | 15:24:50,122 | 127.0.0.1 | 68 Peparing statement | 15:24:50,123 | 127.0.0.1 | 482 Determining replicas for mutation | 15:24:50,123 | 127.0.0.1 | 762 Acquiring switchLock read lock | 15:24:50,124 | 127.0.0.1 | 1790 Appending to commitlog | 15:24:50,124 | 127.0.0.1 | 1815 Adding to bar memtable | 15:24:50,124 | 127.0.0.1 | 1871 Request complete | 15:24:50,124 | 127.0.0.1 | 2246 {noformat} it's not just the IF EXISTS syntax: {noformat} cqlsh:foo> update bar set j=2 where i=1 if j=1; activity | timestamp | source | source_elapsed -----------------------------------+--------------+-----------+---------------- execute_cql3_query | 15:25:32,657 | 127.0.0.1 | 0 Parsing statement | 15:25:32,657 | 127.0.0.1 | 47 Peparing statement | 15:25:32,657 | 127.0.0.1 | 306 Determining replicas for mutation | 15:25:32,657 | 127.0.0.1 | 457 Acquiring switchLock read lock | 15:25:32,658 | 127.0.0.1 | 1082 Appending to commitlog | 15:25:32,658 | 127.0.0.1 | 1106 Adding to bar memtable | 15:25:32,658 | 127.0.0.1 | 1163 Request complete | 15:25:32,658 | 127.0.0.1 | 1440 {noformat} ("determining replicas for mutation" is only logged by {{mutate}}.) was (Author: jbellis): The tracing I see suggests that this is actually executing StorageProxy.mutate instead of SP.cas: {noformat} cqlsh:foo> update bar set j=1 where i=1 if not exists; activity | timestamp | source | source_elapsed -----------------------------------+--------------+-----------+---------------- execute_cql3_query | 15:24:50,122 | 127.0.0.1 | 0 Parsing statement | 15:24:50,122 | 127.0.0.1 | 68 Peparing statement | 15:24:50,123 | 127.0.0.1 | 482 Determining replicas for mutation | 15:24:50,123 | 127.0.0.1 | 762 Acquiring switchLock read lock | 15:24:50,124 | 127.0.0.1 | 1790 Appending to commitlog | 15:24:50,124 | 127.0.0.1 | 1815 Adding to bar memtable | 15:24:50,124 | 127.0.0.1 | 1871 Request complete | 15:24:50,124 | 127.0.0.1 | 2246 {noformat} it's not just the IF EXISTS syntax: {noformat} cqlsh:foo> update bar set j=2 where i=1 if j=1; activity | timestamp | source | source_elapsed -----------------------------------+--------------+-----------+---------------- execute_cql3_query | 15:25:32,657 | 127.0.0.1 | 0 Parsing statement | 15:25:32,657 | 127.0.0.1 | 47 Peparing statement | 15:25:32,657 | 127.0.0.1 | 306 Determining replicas for mutation | 15:25:32,657 | 127.0.0.1 | 457 Acquiring switchLock read lock | 15:25:32,658 | 127.0.0.1 | 1082 Appending to commitlog | 15:25:32,658 | 127.0.0.1 | 1106 Adding to bar memtable | 15:25:32,658 | 127.0.0.1 | 1163 Request complete | 15:25:32,658 | 127.0.0.1 | 1440 {noformat} > Add CAS CQL support > ------------------- > > Key: CASSANDRA-5443 > URL: https://issues.apache.org/jira/browse/CASSANDRA-5443 > Project: Cassandra > Issue Type: Sub-task > Components: API, Core > Reporter: Jonathan Ellis > Assignee: Sylvain Lebresne > Fix For: 2.0 > > Attachments: > 0001-Refactor-Update-and-Delete-statement-to-extract-common.txt, > 0002-Add-syntax-to-support-conditional-update-delete.txt, > 0003-Handle-deleted-and-expiring-column-in-paxos-updates.txt, > 0004-Support-tombstones-when-comparing-for-CAS.txt, > 0005-add-UPDATE-.-IF-NOT-EXISTS-syntax.txt, > 0006-Make-EXISTS-a-reserverd-keyword.txt > > -- 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