cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeremiah Jordan (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-7798) Empty clustering column not caught for CQL3 update to compact storage counter table
Date Tue, 19 Aug 2014 22:43:20 GMT

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

Jeremiah Jordan commented on CASSANDRA-7798:
--------------------------------------------

LGTM +1

> Empty clustering column not caught for CQL3 update to compact storage counter table
> -----------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-7798
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-7798
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Jeremiah Jordan
>            Assignee: Aleksey Yeschenko
>             Fix For: 1.2.19, 2.0.10, 2.1.0
>
>         Attachments: 7798-v2.txt, 7798.txt
>
>
> If you update a compact storage counter column through cql3 you can set an empty column
name, which is invalid.  The server catches this for normal tables, but misses it for counters,
and you end up with an assertion when the  mutation gets serialized.
> {noformat}
> CREATE TABLE nullcoltest (
>   key text,
>   column1 text,
>   value counter,
>   PRIMARY KEY (key, column1)
> ) WITH COMPACT STORAGE;
> UPDATE nullcoltest SET value = value + 1 WHERE key = 'k1' AND column1 = '';
> {noformat}
> {noformat}
> ERROR [COMMIT-LOG-WRITER] 2014-08-19 16:11:12,179 CassandraDaemon.java (line 199) Exception
in thread Thread[COMMIT-LOG-WRITER,5,main]
> java.lang.AssertionError
> 	at org.apache.cassandra.db.ColumnSerializer.serialize(ColumnSerializer.java:56)
> 	at org.apache.cassandra.db.ColumnFamilySerializer.serialize(ColumnFamilySerializer.java:77)
> 	at org.apache.cassandra.db.RowMutation$RowMutationSerializer.serialize(RowMutation.java:278)
> 	at org.apache.cassandra.db.commitlog.CommitLogSegment.write(CommitLogSegment.java:264)
> 	at org.apache.cassandra.db.commitlog.CommitLog$LogRecordAdder.run(CommitLog.java:357)
> 	at org.apache.cassandra.db.commitlog.PeriodicCommitLogExecutorService$1.runMayThrow(PeriodicCommitLogExecutorService.java:51)
> 	at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28)
> 	at java.lang.Thread.run(Thread.java:744)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message