cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Ellis (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CASSANDRA-4377) CQL3 column value validation bug
Date Thu, 09 Aug 2012 15:58:19 GMT

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

Jonathan Ellis edited comment on CASSANDRA-4377 at 8/9/12 3:57 PM:
-------------------------------------------------------------------

So basically, the problem is we're trying to maintain compatibility with (non-cql3) wide-row
named columns?   If we're willing to break that scenario, does the problem go away?

I still think that naming wide row columns is nonsensical, but we could add an extra layer
of protection by warning on startup in 1.2 that you need to update your schema:

- if you have named columns and non-utf8-or-bytes comparator
- if you have named columns but metadata shows more columns than names
                
      was (Author: jbellis):
    So basically, the problem is we're trying to maintain compatibility with wide-row named
columns?   If we're willing to break that scenario, does the problem go away?

I still think that naming wide row columns is nonsensical, but we could add an extra layer
of protection by warning on startup in 1.2 that you need to update your schema:

- if you have named columns and non-utf8-or-bytes comparator
- if you have named columns but metadata shows more columns than names
                  
> CQL3 column value validation bug
> --------------------------------
>
>                 Key: CASSANDRA-4377
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4377
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 1.1.1
>            Reporter: Nick Bailey
>            Assignee: Sylvain Lebresne
>             Fix For: 1.1.4
>
>         Attachments: 4377.txt
>
>
> {noformat}
> cqlsh> create keyspace test with strategy_class = 'SimpleStrategy' and strategy_options:replication_factor
= 1;
> cqlsh> use test;
> cqlsh:test> CREATE TABLE stats (
>         ...   gid          blob,
>         ...   period     int,
>         ...   tid          blob, 
>         ...   sum        int,
>         ...   uniques           blob,
>         ...   PRIMARY KEY(gid, period, tid)
>         ... );
> cqlsh:test> describe columnfamily stats;
> CREATE TABLE stats (
>   gid blob PRIMARY KEY
> ) WITH
>   comment='' AND
>   comparator='CompositeType(org.apache.cassandra.db.marshal.Int32Type,org.apache.cassandra.db.marshal.BytesType,org.apache.cassandra.db.marshal.UTF8Type)'
AND
>   read_repair_chance=0.100000 AND
>   gc_grace_seconds=864000 AND
>   default_validation=text AND
>   min_compaction_threshold=4 AND
>   max_compaction_threshold=32 AND
>   replicate_on_write='true' AND
>   compaction_strategy_class='SizeTieredCompactionStrategy' AND
>   compression_parameters:sstable_compression='SnappyCompressor';
> {noformat}
> You can see in the above output that the stats cf is created with the column validator
set to text, but neither of the non primary key columns defined are text. It should either
be setting metadata for those columns or not setting a default validator or some combination
of the two.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message