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

Jonathan Ellis commented on CASSANDRA-4377:
-------------------------------------------

Here's what I think our goals are, in order of importance:

# Existing "high level" clients should have a reasonable upgrade path to read 
and update collections and cql3 CFs.
# CLI and other tools that don't speak cql should have a way to tell that they 
can't cope with CQL3 CF definitions.  This is the problem Nick described 
originally in this ticket description.  Actually making such tools able to 
manipulate CQL3 definitions is NOT a goal, but we should, as Nick says, make 
that more obvious.
# We should allow updates to CQL3 CFs from Thrift, if someone manually composes 
the correct CompositeType bytes.  This is what most of the rest of the 
discussion here involves.

Analysis:

# This we have done--they will have to use cql-over-thrift, but IMO this is 
reasonable.  Thrift RPC methods to deal with collections have never been on the 
roadmap.
# This is tough since if this involves new information (like exposing 
component_index, or even adding a cql3 boolean to CfDef) then old tools by 
definition won't know about it.  *Proposal:* what if we omit CQL3 CfDefs from 
those we return to describe_keyspace[s] calls?  Not quite as good as returning 
a CfDef that explicitly says "I am here but you can't touch this," but compare 
to displaying incomplete information (that the cli doesn't know is incomplete) 
it's much more obvious that the cli and other old thrift-base schema 
manipulators can't cope with such.
# Sylvain mentioned adding a thrift or JMX method to enable validation-free 
updates but I'd rather make ThriftValidation cql3-aware, which would let this 
work without any special flags.  I don't see any downside to this except added 
complexity for ThriftValidation.
                
> 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.5
>
>         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

        

Reply via email to