[jira] [Updated] (CASSANDRA-4377) CQL3 column value validation bug

2012-09-06 Thread Sylvain Lebresne (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-4377?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sylvain Lebresne updated CASSANDRA-4377:


Attachment: 4377-2.txt

On Pavel's patch:
* I'm not a fan of logging a warning (or to log anything really) if someone has 
CQL3 CFs. We're trying to push CQL3 as a good thing, let's not log anything 
that could be interpreted as if something was wrong/abnormal.
* The check is excluding composite CF without any ColumnDefinition while it 
shouldn't.

Attaching a v2 that:
* Fix the two remarks above.
* Rename the check as isThriftIncompatible. I think it's more about detecting 
CF definitions that cannot be exploided fully by thrift rather than 
discriminate between what is a thrift CF and CQL3 CF. Especially since the 
intersection between those two notions is not empty.
* Ship the changes to ThriftValidation from my first patch, though modified a 
bit to be more generic and handle correctly collections. I'll note that this 
part makes validation potentially iterate over all ColumnDefinition for 
composite CF, but that's not really an issue since composite CF created on the 
thrift side are almost guaranteed to have no ColumnDefinition.


 CQL3 column value validation bug
 

 Key: CASSANDRA-4377
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4377
 Project: Cassandra
  Issue Type: Bug
  Components: API
Affects Versions: 1.1.1
Reporter: Nick Bailey
Assignee: Pavel Yaskevich
  Labels: cql3
 Fix For: 1.2.0

 Attachments: 4377-2.txt, 4377.txt, CASSANDRA-4377.patch


 {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, 
 ...   sumint,
 ...   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.10 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
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (CASSANDRA-4377) CQL3 column value validation bug

2012-08-31 Thread Jonathan Ellis (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-4377?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jonathan Ellis updated CASSANDRA-4377:
--

Reviewer: slebresne  (was: jbellis)

 CQL3 column value validation bug
 

 Key: CASSANDRA-4377
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4377
 Project: Cassandra
  Issue Type: Bug
  Components: API
Affects Versions: 1.1.1
Reporter: Nick Bailey
Assignee: Pavel Yaskevich
  Labels: cql3
 Fix For: 1.2.0

 Attachments: 4377.txt, CASSANDRA-4377.patch


 {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, 
 ...   sumint,
 ...   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.10 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
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (CASSANDRA-4377) CQL3 column value validation bug

2012-08-22 Thread Pavel Yaskevich (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-4377?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Pavel Yaskevich updated CASSANDRA-4377:
---

Attachment: CASSANDRA-4377.patch

CQL3 defined CFs won't be exposed to Thrift API anymore (with warning), I also 
checked CassandraServer and ThriftValidation and figured that column name 
validation already in place via ThriftValidation.validateColumnNames(...).

 CQL3 column value validation bug
 

 Key: CASSANDRA-4377
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4377
 Project: Cassandra
  Issue Type: Bug
  Components: API
Affects Versions: 1.1.1
Reporter: Nick Bailey
Assignee: Pavel Yaskevich
  Labels: cql3
 Fix For: 1.2.0

 Attachments: 4377.txt, CASSANDRA-4377.patch


 {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, 
 ...   sumint,
 ...   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.10 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




[jira] [Updated] (CASSANDRA-4377) CQL3 column value validation bug

2012-08-17 Thread Jonathan Ellis (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-4377?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jonathan Ellis updated CASSANDRA-4377:
--

 Reviewer: jbellis
  Component/s: API
Fix Version/s: (was: 1.1.5)
   1.2.0
 Assignee: Pavel Yaskevich  (was: Sylvain Lebresne)
   Labels: cql3  (was: )

I do think we should push this to 1.2 however, since I'm leery of changing the 
behavior or describe_keyspace[s] when we are fairly deep into 1.1's stable 
lifetime.

 CQL3 column value validation bug
 

 Key: CASSANDRA-4377
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4377
 Project: Cassandra
  Issue Type: Bug
  Components: API
Affects Versions: 1.1.1
Reporter: Nick Bailey
Assignee: Pavel Yaskevich
  Labels: cql3
 Fix For: 1.2.0

 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, 
 ...   sumint,
 ...   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.10 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




[jira] [Updated] (CASSANDRA-4377) CQL3 column value validation bug

2012-07-10 Thread Sylvain Lebresne (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-4377?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sylvain Lebresne updated CASSANDRA-4377:


Attachment: 4377.txt

Attaching simple patch to allow the insertion in the case above. Truth is, I'm 
not really satisfied (though I don't have a clearly better option) by such a 
patch for 2 reasons:
# it will break the case for thrift where people were using compositeType and 
column_metadata on them. That might be 0 people we're talking about but it's 
still a bit annoying. An alternative here would be that for each composite 
column, we iterater over all column_metadata and check where one apply. This 
would work but this feels butt ugly.
# it feels to me we supporting either not enough or too much in the thrift 
side. Even if we support this, we still don't expose the CQL3 metadata to 
thrift, so one has to know the CQL schema definition to be able to create the 
column in the first place (or deserialize it on read). In particular, most 
advanced thrift client will likely still break at one point or another.

Overall I see two reasonable approaches:
* Either we start exposing enough on the thirft side so that thrift client can 
work correctly with CQL3. While this may be doable reasonably easily now, this 
will be increasingly difficult with things like CASSANDRA-4179, CASSANDRA-3647, 
... Besides, even if we make it possible to work with CQL3 table, it doesn't 
mean it will be convenient since thrift won't do the grouping of columns in 
sparse table.
* Be clear that you cannot work with CQL3 created table from thrift.

But imo the in-the-middle approach that this patch would start takes the risk 
of polluting the thrift side without adding much.


 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.3

 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, 
 ...   sumint,
 ...   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.10 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




[jira] [Updated] (CASSANDRA-4377) CQL3 column value validation bug

2012-06-26 Thread Jonathan Ellis (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-4377?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jonathan Ellis updated CASSANDRA-4377:
--

Assignee: Sylvain Lebresne

 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.2


 {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, 
 ...   sumint,
 ...   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.10 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