[jira] [Commented] (CASSANDRA-5138) Provide a better CQL error when table data does not conform to CQL metadata.
[ https://issues.apache.org/jira/browse/CASSANDRA-5138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13774512#comment-13774512 ] Sylvain Lebresne commented on CASSANDRA-5138: - You're right, but since this has been closed and has shipped already, opened CASSANDRA-6081 to fix letting row markers pass validation. Provide a better CQL error when table data does not conform to CQL metadata. Key: CASSANDRA-5138 URL: https://issues.apache.org/jira/browse/CASSANDRA-5138 Project: Cassandra Issue Type: Bug Components: Core Affects Versions: 1.2.0 Environment: Mac OS X running 1.2 Reporter: Brian ONeill Assignee: Sylvain Lebresne Priority: Minor Fix For: 2.0.0 Attachments: 5138-2.txt, 5138.txt, northpole.cql When you create a table via CQL, then insert into it via Thrift. If you inadvertently leave out a component of the column name, in CQL you receive a: TSocket read 0 bytes Server-side the following exception is logged: ERROR 15:19:18,016 Error occurred during processing of message. java.lang.ArrayIndexOutOfBoundsException: 3 at org.apache.cassandra.cql3.statements.ColumnGroupMap.add(ColumnGroupMap.java:43) at org.apache.cassandra.cql3.statements.ColumnGroupMap.access$200(ColumnGroupMap.java:31) at org.apache.cassandra.cql3.statements.ColumnGroupMap$Builder.add(ColumnGroupMap.java:138) at org.apache.cassandra.cql3.statements.SelectStatement.process(SelectStatement.java:805) at org.apache.cassandra.cql3.statements.SelectStatement.processResults(SelectStatement.java:145) at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:134) at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:61) at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:132) at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:140) at org.apache.cassandra.thrift.CassandraServer.execute_cql3_query(CassandraServer.java:1686) at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4074) at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4062) at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32) at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34) at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:199) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:680) I'll submit a schema, and steps to reproduce. -- 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] [Commented] (CASSANDRA-5138) Provide a better CQL error when table data does not conform to CQL metadata.
[ https://issues.apache.org/jira/browse/CASSANDRA-5138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13772099#comment-13772099 ] Elvis Pranskevichus commented on CASSANDRA-5138: I think the best fix would be to make CassandraServer insert row markers into CQL3 tables the same way CQL modification statements do. Provide a better CQL error when table data does not conform to CQL metadata. Key: CASSANDRA-5138 URL: https://issues.apache.org/jira/browse/CASSANDRA-5138 Project: Cassandra Issue Type: Bug Components: Core Affects Versions: 1.2.0 Environment: Mac OS X running 1.2 Reporter: Brian ONeill Assignee: Sylvain Lebresne Priority: Minor Fix For: 2.0 Attachments: 5138-2.txt, 5138.txt, northpole.cql When you create a table via CQL, then insert into it via Thrift. If you inadvertently leave out a component of the column name, in CQL you receive a: TSocket read 0 bytes Server-side the following exception is logged: ERROR 15:19:18,016 Error occurred during processing of message. java.lang.ArrayIndexOutOfBoundsException: 3 at org.apache.cassandra.cql3.statements.ColumnGroupMap.add(ColumnGroupMap.java:43) at org.apache.cassandra.cql3.statements.ColumnGroupMap.access$200(ColumnGroupMap.java:31) at org.apache.cassandra.cql3.statements.ColumnGroupMap$Builder.add(ColumnGroupMap.java:138) at org.apache.cassandra.cql3.statements.SelectStatement.process(SelectStatement.java:805) at org.apache.cassandra.cql3.statements.SelectStatement.processResults(SelectStatement.java:145) at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:134) at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:61) at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:132) at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:140) at org.apache.cassandra.thrift.CassandraServer.execute_cql3_query(CassandraServer.java:1686) at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4074) at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4062) at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32) at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34) at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:199) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:680) I'll submit a schema, and steps to reproduce. -- 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] [Commented] (CASSANDRA-5138) Provide a better CQL error when table data does not conform to CQL metadata.
[ https://issues.apache.org/jira/browse/CASSANDRA-5138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13772031#comment-13772031 ] Elvis Pranskevichus commented on CASSANDRA-5138: Another related issue. This check seems to make it impossible to insert proper records into CQL3 tables via Thrift, since it bails out on an attempt to write a column with an empty last component. CREATE TABLE test ( id text, attr text, value text, PRIMARY KEY (id, attr) ); The storage column structure for the table would be: key {attr,}[empty] key {attr,value} value There is no way to insert the first column (record demarcation) as it fails with Invalid cell for CQL3 table test. The CQL3 column component () does not correspond to a defined CQL3 column Provide a better CQL error when table data does not conform to CQL metadata. Key: CASSANDRA-5138 URL: https://issues.apache.org/jira/browse/CASSANDRA-5138 Project: Cassandra Issue Type: Bug Components: Core Affects Versions: 1.2.0 Environment: Mac OS X running 1.2 Reporter: Brian ONeill Assignee: Sylvain Lebresne Priority: Minor Fix For: 2.0 Attachments: 5138-2.txt, 5138.txt, northpole.cql When you create a table via CQL, then insert into it via Thrift. If you inadvertently leave out a component of the column name, in CQL you receive a: TSocket read 0 bytes Server-side the following exception is logged: ERROR 15:19:18,016 Error occurred during processing of message. java.lang.ArrayIndexOutOfBoundsException: 3 at org.apache.cassandra.cql3.statements.ColumnGroupMap.add(ColumnGroupMap.java:43) at org.apache.cassandra.cql3.statements.ColumnGroupMap.access$200(ColumnGroupMap.java:31) at org.apache.cassandra.cql3.statements.ColumnGroupMap$Builder.add(ColumnGroupMap.java:138) at org.apache.cassandra.cql3.statements.SelectStatement.process(SelectStatement.java:805) at org.apache.cassandra.cql3.statements.SelectStatement.processResults(SelectStatement.java:145) at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:134) at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:61) at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:132) at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:140) at org.apache.cassandra.thrift.CassandraServer.execute_cql3_query(CassandraServer.java:1686) at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4074) at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4062) at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32) at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34) at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:199) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:680) I'll submit a schema, and steps to reproduce. -- 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] [Commented] (CASSANDRA-5138) Provide a better CQL error when table data does not conform to CQL metadata.
[ https://issues.apache.org/jira/browse/CASSANDRA-5138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13745836#comment-13745836 ] Sylvain Lebresne commented on CASSANDRA-5138: - You're right, there was a typo in the initial patch, we were checking against the clustering keys at a place where we were suppose to check the non-PK columns. Anyway, I took the liberty to commit the trivial fix to 7a300c2 (and checked insertion in a table like the one above does work as expected). Provide a better CQL error when table data does not conform to CQL metadata. Key: CASSANDRA-5138 URL: https://issues.apache.org/jira/browse/CASSANDRA-5138 Project: Cassandra Issue Type: Bug Components: Core Affects Versions: 1.2.0 Environment: Mac OS X running 1.2 Reporter: Brian ONeill Assignee: Sylvain Lebresne Priority: Minor Fix For: 2.0 Attachments: 5138-2.txt, 5138.txt, northpole.cql When you create a table via CQL, then insert into it via Thrift. If you inadvertently leave out a component of the column name, in CQL you receive a: TSocket read 0 bytes Server-side the following exception is logged: ERROR 15:19:18,016 Error occurred during processing of message. java.lang.ArrayIndexOutOfBoundsException: 3 at org.apache.cassandra.cql3.statements.ColumnGroupMap.add(ColumnGroupMap.java:43) at org.apache.cassandra.cql3.statements.ColumnGroupMap.access$200(ColumnGroupMap.java:31) at org.apache.cassandra.cql3.statements.ColumnGroupMap$Builder.add(ColumnGroupMap.java:138) at org.apache.cassandra.cql3.statements.SelectStatement.process(SelectStatement.java:805) at org.apache.cassandra.cql3.statements.SelectStatement.processResults(SelectStatement.java:145) at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:134) at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:61) at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:132) at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:140) at org.apache.cassandra.thrift.CassandraServer.execute_cql3_query(CassandraServer.java:1686) at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4074) at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4062) at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32) at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34) at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:199) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:680) I'll submit a schema, and steps to reproduce. -- 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] [Commented] (CASSANDRA-5138) Provide a better CQL error when table data does not conform to CQL metadata.
[ https://issues.apache.org/jira/browse/CASSANDRA-5138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13743660#comment-13743660 ] Sylvain Lebresne commented on CASSANDRA-5138: - It is not allowed to insert cells (thrift columns if you will) that do not correspond to a declared CQL3 column no. But that's something that would qualify as wrong from a CQL3 point of view anyway so that does is intentional. Now from your description, it's hard to say if you were doing it wrong or if the added validation is indeed too restrictive, but at least looking quickly at the patch again I don't see anything wrong. Maybe can you give a simple example of what you're trying to do and doesn't work (the CQL3 schema of the CF and and example of insertion that doesn't work with cassandra-cli for instance)? Provide a better CQL error when table data does not conform to CQL metadata. Key: CASSANDRA-5138 URL: https://issues.apache.org/jira/browse/CASSANDRA-5138 Project: Cassandra Issue Type: Bug Components: Core Affects Versions: 1.2.0 Environment: Mac OS X running 1.2 Reporter: Brian ONeill Assignee: Sylvain Lebresne Priority: Minor Fix For: 2.0 Attachments: 5138-2.txt, 5138.txt, northpole.cql When you create a table via CQL, then insert into it via Thrift. If you inadvertently leave out a component of the column name, in CQL you receive a: TSocket read 0 bytes Server-side the following exception is logged: ERROR 15:19:18,016 Error occurred during processing of message. java.lang.ArrayIndexOutOfBoundsException: 3 at org.apache.cassandra.cql3.statements.ColumnGroupMap.add(ColumnGroupMap.java:43) at org.apache.cassandra.cql3.statements.ColumnGroupMap.access$200(ColumnGroupMap.java:31) at org.apache.cassandra.cql3.statements.ColumnGroupMap$Builder.add(ColumnGroupMap.java:138) at org.apache.cassandra.cql3.statements.SelectStatement.process(SelectStatement.java:805) at org.apache.cassandra.cql3.statements.SelectStatement.processResults(SelectStatement.java:145) at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:134) at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:61) at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:132) at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:140) at org.apache.cassandra.thrift.CassandraServer.execute_cql3_query(CassandraServer.java:1686) at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4074) at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4062) at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32) at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34) at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:199) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:680) I'll submit a schema, and steps to reproduce. -- 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] [Commented] (CASSANDRA-5138) Provide a better CQL error when table data does not conform to CQL metadata.
[ https://issues.apache.org/jira/browse/CASSANDRA-5138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13743872#comment-13743872 ] Elvis Pranskevichus commented on CASSANDRA-5138: I understand that columns not declared in CQL3 are supposed to fail validation. The problem is that even _defined_ columns in non-compact tables fail now. Something as simple as CREATE TABLE test ( id text, attr text, value text, PRIMARY KEY (id, attr) ); It is no longer possible to write into value from Thrift, because it's not a part of the clustering key, which is apparently what CFMetadata.columns is populated from and against what the check is done. Provide a better CQL error when table data does not conform to CQL metadata. Key: CASSANDRA-5138 URL: https://issues.apache.org/jira/browse/CASSANDRA-5138 Project: Cassandra Issue Type: Bug Components: Core Affects Versions: 1.2.0 Environment: Mac OS X running 1.2 Reporter: Brian ONeill Assignee: Sylvain Lebresne Priority: Minor Fix For: 2.0 Attachments: 5138-2.txt, 5138.txt, northpole.cql When you create a table via CQL, then insert into it via Thrift. If you inadvertently leave out a component of the column name, in CQL you receive a: TSocket read 0 bytes Server-side the following exception is logged: ERROR 15:19:18,016 Error occurred during processing of message. java.lang.ArrayIndexOutOfBoundsException: 3 at org.apache.cassandra.cql3.statements.ColumnGroupMap.add(ColumnGroupMap.java:43) at org.apache.cassandra.cql3.statements.ColumnGroupMap.access$200(ColumnGroupMap.java:31) at org.apache.cassandra.cql3.statements.ColumnGroupMap$Builder.add(ColumnGroupMap.java:138) at org.apache.cassandra.cql3.statements.SelectStatement.process(SelectStatement.java:805) at org.apache.cassandra.cql3.statements.SelectStatement.processResults(SelectStatement.java:145) at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:134) at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:61) at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:132) at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:140) at org.apache.cassandra.thrift.CassandraServer.execute_cql3_query(CassandraServer.java:1686) at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4074) at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4062) at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32) at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34) at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:199) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:680) I'll submit a schema, and steps to reproduce. -- 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] [Commented] (CASSANDRA-5138) Provide a better CQL error when table data does not conform to CQL metadata.
[ https://issues.apache.org/jira/browse/CASSANDRA-5138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13742553#comment-13742553 ] Elvis Pranskevichus commented on CASSANDRA-5138: Guys, this completely broke writing to CQL3 tables from Thrift for me. The name check is done against CFDefinition.columns, which seems to be populated with clustering key columns only. Thus, it is not possible to write into columns that are outside the PRIMARY KEY. Is this intentional? Provide a better CQL error when table data does not conform to CQL metadata. Key: CASSANDRA-5138 URL: https://issues.apache.org/jira/browse/CASSANDRA-5138 Project: Cassandra Issue Type: Bug Components: Core Affects Versions: 1.2.0 Environment: Mac OS X running 1.2 Reporter: Brian ONeill Assignee: Sylvain Lebresne Priority: Minor Fix For: 2.0 Attachments: 5138-2.txt, 5138.txt, northpole.cql When you create a table via CQL, then insert into it via Thrift. If you inadvertently leave out a component of the column name, in CQL you receive a: TSocket read 0 bytes Server-side the following exception is logged: ERROR 15:19:18,016 Error occurred during processing of message. java.lang.ArrayIndexOutOfBoundsException: 3 at org.apache.cassandra.cql3.statements.ColumnGroupMap.add(ColumnGroupMap.java:43) at org.apache.cassandra.cql3.statements.ColumnGroupMap.access$200(ColumnGroupMap.java:31) at org.apache.cassandra.cql3.statements.ColumnGroupMap$Builder.add(ColumnGroupMap.java:138) at org.apache.cassandra.cql3.statements.SelectStatement.process(SelectStatement.java:805) at org.apache.cassandra.cql3.statements.SelectStatement.processResults(SelectStatement.java:145) at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:134) at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:61) at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:132) at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:140) at org.apache.cassandra.thrift.CassandraServer.execute_cql3_query(CassandraServer.java:1686) at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4074) at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4062) at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32) at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34) at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:199) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:680) I'll submit a schema, and steps to reproduce. -- 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] [Commented] (CASSANDRA-5138) Provide a better CQL error when table data does not conform to CQL metadata.
[ https://issues.apache.org/jira/browse/CASSANDRA-5138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13718404#comment-13718404 ] Jonathan Ellis commented on CASSANDRA-5138: --- +1 Provide a better CQL error when table data does not conform to CQL metadata. Key: CASSANDRA-5138 URL: https://issues.apache.org/jira/browse/CASSANDRA-5138 Project: Cassandra Issue Type: Bug Components: Core Affects Versions: 1.2.0 Environment: Mac OS X running 1.2 Reporter: Brian ONeill Assignee: Sylvain Lebresne Priority: Minor Fix For: 1.2.7 Attachments: 5138-2.txt, 5138.txt, northpole.cql When you create a table via CQL, then insert into it via Thrift. If you inadvertently leave out a component of the column name, in CQL you receive a: TSocket read 0 bytes Server-side the following exception is logged: ERROR 15:19:18,016 Error occurred during processing of message. java.lang.ArrayIndexOutOfBoundsException: 3 at org.apache.cassandra.cql3.statements.ColumnGroupMap.add(ColumnGroupMap.java:43) at org.apache.cassandra.cql3.statements.ColumnGroupMap.access$200(ColumnGroupMap.java:31) at org.apache.cassandra.cql3.statements.ColumnGroupMap$Builder.add(ColumnGroupMap.java:138) at org.apache.cassandra.cql3.statements.SelectStatement.process(SelectStatement.java:805) at org.apache.cassandra.cql3.statements.SelectStatement.processResults(SelectStatement.java:145) at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:134) at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:61) at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:132) at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:140) at org.apache.cassandra.thrift.CassandraServer.execute_cql3_query(CassandraServer.java:1686) at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4074) at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4062) at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32) at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34) at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:199) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:680) I'll submit a schema, and steps to reproduce. -- 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] [Commented] (CASSANDRA-5138) Provide a better CQL error when table data does not conform to CQL metadata.
[ https://issues.apache.org/jira/browse/CASSANDRA-5138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13718407#comment-13718407 ] Jonathan Ellis commented on CASSANDRA-5138: --- ... although we might want to make this 2.0-only to be on the safe side. Provide a better CQL error when table data does not conform to CQL metadata. Key: CASSANDRA-5138 URL: https://issues.apache.org/jira/browse/CASSANDRA-5138 Project: Cassandra Issue Type: Bug Components: Core Affects Versions: 1.2.0 Environment: Mac OS X running 1.2 Reporter: Brian ONeill Assignee: Sylvain Lebresne Priority: Minor Fix For: 1.2.7 Attachments: 5138-2.txt, 5138.txt, northpole.cql When you create a table via CQL, then insert into it via Thrift. If you inadvertently leave out a component of the column name, in CQL you receive a: TSocket read 0 bytes Server-side the following exception is logged: ERROR 15:19:18,016 Error occurred during processing of message. java.lang.ArrayIndexOutOfBoundsException: 3 at org.apache.cassandra.cql3.statements.ColumnGroupMap.add(ColumnGroupMap.java:43) at org.apache.cassandra.cql3.statements.ColumnGroupMap.access$200(ColumnGroupMap.java:31) at org.apache.cassandra.cql3.statements.ColumnGroupMap$Builder.add(ColumnGroupMap.java:138) at org.apache.cassandra.cql3.statements.SelectStatement.process(SelectStatement.java:805) at org.apache.cassandra.cql3.statements.SelectStatement.processResults(SelectStatement.java:145) at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:134) at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:61) at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:132) at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:140) at org.apache.cassandra.thrift.CassandraServer.execute_cql3_query(CassandraServer.java:1686) at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4074) at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4062) at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32) at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34) at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:199) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:680) I'll submit a schema, and steps to reproduce. -- 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] [Commented] (CASSANDRA-5138) Provide a better CQL error when table data does not conform to CQL metadata.
[ https://issues.apache.org/jira/browse/CASSANDRA-5138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13715311#comment-13715311 ] Jonathan Ellis commented on CASSANDRA-5138: --- IMO we should do that extra check (also type information, unless that's already taken care of by the other validation). If you really wanted unchecked composite inserts, you'd presumably create the table from Thrift. So here we should assume that the user is doing his best to create a valid CQL row and we should reject invalid ones. Provide a better CQL error when table data does not conform to CQL metadata. Key: CASSANDRA-5138 URL: https://issues.apache.org/jira/browse/CASSANDRA-5138 Project: Cassandra Issue Type: Bug Components: Core Affects Versions: 1.2.0 Environment: Mac OS X running 1.2 Reporter: Brian ONeill Assignee: Sylvain Lebresne Priority: Minor Fix For: 1.2.7 Attachments: 5138.txt, northpole.cql When you create a table via CQL, then insert into it via Thrift. If you inadvertently leave out a component of the column name, in CQL you receive a: TSocket read 0 bytes Server-side the following exception is logged: ERROR 15:19:18,016 Error occurred during processing of message. java.lang.ArrayIndexOutOfBoundsException: 3 at org.apache.cassandra.cql3.statements.ColumnGroupMap.add(ColumnGroupMap.java:43) at org.apache.cassandra.cql3.statements.ColumnGroupMap.access$200(ColumnGroupMap.java:31) at org.apache.cassandra.cql3.statements.ColumnGroupMap$Builder.add(ColumnGroupMap.java:138) at org.apache.cassandra.cql3.statements.SelectStatement.process(SelectStatement.java:805) at org.apache.cassandra.cql3.statements.SelectStatement.processResults(SelectStatement.java:145) at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:134) at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:61) at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:132) at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:140) at org.apache.cassandra.thrift.CassandraServer.execute_cql3_query(CassandraServer.java:1686) at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4074) at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4062) at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32) at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34) at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:199) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:680) I'll submit a schema, and steps to reproduce. -- 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] [Commented] (CASSANDRA-5138) Provide a better CQL error when table data does not conform to CQL metadata.
[ https://issues.apache.org/jira/browse/CASSANDRA-5138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13715321#comment-13715321 ] Sylvain Lebresne commented on CASSANDRA-5138: - bq. IMO we should do that extra check To complete the reason why I haven't add it, this is mostly because of DROP (CASSANDRA-3919). So in practice, people may have cell that don't correspond to a (currently) defined CQL3 column name, even if it's only temporary. For that, it could seem fair game to at least let user delete those from thrift. But I mean, I don't really care, I'm fine doing that extra check if you still think it's better, just wanted to present the full reasoning. bq. also type information, unless that's already taken care of by the other validation Thrift already does validation of the cell name and cell value (as well as partition key). So unless you were thinking of something else, we should be good. Provide a better CQL error when table data does not conform to CQL metadata. Key: CASSANDRA-5138 URL: https://issues.apache.org/jira/browse/CASSANDRA-5138 Project: Cassandra Issue Type: Bug Components: Core Affects Versions: 1.2.0 Environment: Mac OS X running 1.2 Reporter: Brian ONeill Assignee: Sylvain Lebresne Priority: Minor Fix For: 1.2.7 Attachments: 5138.txt, northpole.cql When you create a table via CQL, then insert into it via Thrift. If you inadvertently leave out a component of the column name, in CQL you receive a: TSocket read 0 bytes Server-side the following exception is logged: ERROR 15:19:18,016 Error occurred during processing of message. java.lang.ArrayIndexOutOfBoundsException: 3 at org.apache.cassandra.cql3.statements.ColumnGroupMap.add(ColumnGroupMap.java:43) at org.apache.cassandra.cql3.statements.ColumnGroupMap.access$200(ColumnGroupMap.java:31) at org.apache.cassandra.cql3.statements.ColumnGroupMap$Builder.add(ColumnGroupMap.java:138) at org.apache.cassandra.cql3.statements.SelectStatement.process(SelectStatement.java:805) at org.apache.cassandra.cql3.statements.SelectStatement.processResults(SelectStatement.java:145) at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:134) at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:61) at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:132) at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:140) at org.apache.cassandra.thrift.CassandraServer.execute_cql3_query(CassandraServer.java:1686) at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4074) at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4062) at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32) at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34) at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:199) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:680) I'll submit a schema, and steps to reproduce. -- 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] [Commented] (CASSANDRA-5138) Provide a better CQL error when table data does not conform to CQL metadata.
[ https://issues.apache.org/jira/browse/CASSANDRA-5138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13715373#comment-13715373 ] Jonathan Ellis commented on CASSANDRA-5138: --- I don't think I follow -- when we implement DROP it will effectively delete columns without the user explicitly having to do so. If you're worried about concurrency, I think your reasoning about Don't Do That from the keyspaces ticket applies. Provide a better CQL error when table data does not conform to CQL metadata. Key: CASSANDRA-5138 URL: https://issues.apache.org/jira/browse/CASSANDRA-5138 Project: Cassandra Issue Type: Bug Components: Core Affects Versions: 1.2.0 Environment: Mac OS X running 1.2 Reporter: Brian ONeill Assignee: Sylvain Lebresne Priority: Minor Fix For: 1.2.7 Attachments: 5138.txt, northpole.cql When you create a table via CQL, then insert into it via Thrift. If you inadvertently leave out a component of the column name, in CQL you receive a: TSocket read 0 bytes Server-side the following exception is logged: ERROR 15:19:18,016 Error occurred during processing of message. java.lang.ArrayIndexOutOfBoundsException: 3 at org.apache.cassandra.cql3.statements.ColumnGroupMap.add(ColumnGroupMap.java:43) at org.apache.cassandra.cql3.statements.ColumnGroupMap.access$200(ColumnGroupMap.java:31) at org.apache.cassandra.cql3.statements.ColumnGroupMap$Builder.add(ColumnGroupMap.java:138) at org.apache.cassandra.cql3.statements.SelectStatement.process(SelectStatement.java:805) at org.apache.cassandra.cql3.statements.SelectStatement.processResults(SelectStatement.java:145) at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:134) at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:61) at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:132) at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:140) at org.apache.cassandra.thrift.CassandraServer.execute_cql3_query(CassandraServer.java:1686) at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4074) at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4062) at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32) at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34) at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:199) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:680) I'll submit a schema, and steps to reproduce. -- 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] [Commented] (CASSANDRA-5138) Provide a better CQL error when table data does not conform to CQL metadata.
[ https://issues.apache.org/jira/browse/CASSANDRA-5138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13549808#comment-13549808 ] Sylvain Lebresne commented on CASSANDRA-5138: - I don't think it is reasonable to have CQL validate on every read that no bad data has been added to non compact table through thrift: outside of not being particularly simple to implement and error prone, it would be silly performance wise. The fact is, *non* compact CQL3 tables are a CQL3 things and in theory they should not be accessible at all through thrift (exactly because thrift has the potential of screwing things up). But I do understand the willingness to use thrift to look under the cover to see how things are implemented and that definitively have educational value. Which imo leaves us with the following options: # do nothing and be clear that 'you shalt not mess up with non compact CQL3 table through thrift' and that if you do, things may break in unexpected ways. # add validation on the thrift write path. # refuse write access to non compact CQL3 tables from thrift by default with an option to deactivate that protection at your own risk. In an ideal world 2) would be the best solution. However, adding said validation is not 2 lines of code, far from it, and there would be the maintenance cost of keeping said validation up to date with the evolutions of CQL3. So, and especially given that accessing non compact CQL3 table from thrift is difficult anyway due to not all metadata being exposed, I'm not convinced that adding said validation would be the best use of our developer resources. Of course if someone is willing to step up to write and maintain that validation code, that's fine, but in the absence of that I would suggest 3) as a good enough compromise. Provide a better CQL error when table data does not conform to CQL metadata. Key: CASSANDRA-5138 URL: https://issues.apache.org/jira/browse/CASSANDRA-5138 Project: Cassandra Issue Type: Bug Components: Core Affects Versions: 1.2.0 Environment: Mac OS X running 1.2 Reporter: Brian ONeill Priority: Minor Attachments: northpole.cql When you create a table via CQL, then insert into it via Thrift. If you inadvertently leave out a component of the column name, in CQL you receive a: TSocket read 0 bytes Server-side the following exception is logged: ERROR 15:19:18,016 Error occurred during processing of message. java.lang.ArrayIndexOutOfBoundsException: 3 at org.apache.cassandra.cql3.statements.ColumnGroupMap.add(ColumnGroupMap.java:43) at org.apache.cassandra.cql3.statements.ColumnGroupMap.access$200(ColumnGroupMap.java:31) at org.apache.cassandra.cql3.statements.ColumnGroupMap$Builder.add(ColumnGroupMap.java:138) at org.apache.cassandra.cql3.statements.SelectStatement.process(SelectStatement.java:805) at org.apache.cassandra.cql3.statements.SelectStatement.processResults(SelectStatement.java:145) at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:134) at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:61) at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:132) at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:140) at org.apache.cassandra.thrift.CassandraServer.execute_cql3_query(CassandraServer.java:1686) at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4074) at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4062) at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32) at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34) at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:199) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:680) I'll submit a schema, and steps to reproduce. -- 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] [Commented] (CASSANDRA-5138) Provide a better CQL error when table data does not conform to CQL metadata.
[ https://issues.apache.org/jira/browse/CASSANDRA-5138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13549828#comment-13549828 ] Jonathan Ellis commented on CASSANDRA-5138: --- I thought #2 (validate on insert) was the plan for CASSANDRA-4377. Unless it's really hairy I do think we should deliver on that. Essentially nobody is going to be able to compose cql-inserts-from-thrift safely otherwise, and as crazy as it is people seem to want to do it. If it makes people feel better about upgrading then I'm in favor. Provide a better CQL error when table data does not conform to CQL metadata. Key: CASSANDRA-5138 URL: https://issues.apache.org/jira/browse/CASSANDRA-5138 Project: Cassandra Issue Type: Bug Components: Core Affects Versions: 1.2.0 Environment: Mac OS X running 1.2 Reporter: Brian ONeill Priority: Minor Attachments: northpole.cql When you create a table via CQL, then insert into it via Thrift. If you inadvertently leave out a component of the column name, in CQL you receive a: TSocket read 0 bytes Server-side the following exception is logged: ERROR 15:19:18,016 Error occurred during processing of message. java.lang.ArrayIndexOutOfBoundsException: 3 at org.apache.cassandra.cql3.statements.ColumnGroupMap.add(ColumnGroupMap.java:43) at org.apache.cassandra.cql3.statements.ColumnGroupMap.access$200(ColumnGroupMap.java:31) at org.apache.cassandra.cql3.statements.ColumnGroupMap$Builder.add(ColumnGroupMap.java:138) at org.apache.cassandra.cql3.statements.SelectStatement.process(SelectStatement.java:805) at org.apache.cassandra.cql3.statements.SelectStatement.processResults(SelectStatement.java:145) at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:134) at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:61) at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:132) at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:140) at org.apache.cassandra.thrift.CassandraServer.execute_cql3_query(CassandraServer.java:1686) at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4074) at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4062) at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32) at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34) at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:199) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:680) I'll submit a schema, and steps to reproduce. -- 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] [Commented] (CASSANDRA-5138) Provide a better CQL error when table data does not conform to CQL metadata.
[ https://issues.apache.org/jira/browse/CASSANDRA-5138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13549860#comment-13549860 ] Sylvain Lebresne commented on CASSANDRA-5138: - bq. I thought #2 (validate on insert) was the plan for CASSANDRA-4377. CASSANDRA-4377 stopped at make sure well formed thrift query do not crash. Making sure you don't do something that would break CQL3 require a bit more. For instance, in theory we should refuse a query that adds a column in a CQL row that doesn't exist in the metadata (it could be that doing so doesn't really break anything but honestly I have no clue if that's the case in practice). Anyway, maybe doing some basic validation is not too hard. But I'm afraid it will be easy to forget validating something that breaks CQL3 in subtle ways. So ok for adding validation on a best effort basis, but I think we should still be clear that this is not encouraged and you have to do it at your own risk. Provide a better CQL error when table data does not conform to CQL metadata. Key: CASSANDRA-5138 URL: https://issues.apache.org/jira/browse/CASSANDRA-5138 Project: Cassandra Issue Type: Bug Components: Core Affects Versions: 1.2.0 Environment: Mac OS X running 1.2 Reporter: Brian ONeill Priority: Minor Attachments: northpole.cql When you create a table via CQL, then insert into it via Thrift. If you inadvertently leave out a component of the column name, in CQL you receive a: TSocket read 0 bytes Server-side the following exception is logged: ERROR 15:19:18,016 Error occurred during processing of message. java.lang.ArrayIndexOutOfBoundsException: 3 at org.apache.cassandra.cql3.statements.ColumnGroupMap.add(ColumnGroupMap.java:43) at org.apache.cassandra.cql3.statements.ColumnGroupMap.access$200(ColumnGroupMap.java:31) at org.apache.cassandra.cql3.statements.ColumnGroupMap$Builder.add(ColumnGroupMap.java:138) at org.apache.cassandra.cql3.statements.SelectStatement.process(SelectStatement.java:805) at org.apache.cassandra.cql3.statements.SelectStatement.processResults(SelectStatement.java:145) at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:134) at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:61) at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:132) at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:140) at org.apache.cassandra.thrift.CassandraServer.execute_cql3_query(CassandraServer.java:1686) at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4074) at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4062) at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32) at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34) at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:199) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:680) I'll submit a schema, and steps to reproduce. -- 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] [Commented] (CASSANDRA-5138) Provide a better CQL error when table data does not conform to CQL metadata.
[ https://issues.apache.org/jira/browse/CASSANDRA-5138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13550784#comment-13550784 ] Brian ONeill commented on CASSANDRA-5138: - Just to be clear, I'd be happy with just a more informative message. (translate the ArrayOutOfBounds, to You may not have enough components in your column name.) To elaborate on the craziness that is accessing tables from CQL that are populated by thrift... We want to enable our data heads with cqlsh. They are very excited about it because it looks like SQL, and to date Cassandra has been inaccessible to them. (These are data gurus that are wizards at a SQL prompt, but do not have server-side access to Cassandra) We have existing (and new) applications that use thrift to write (via Astyanax composite/compound columns using annotated classes). We don't want to change our application development paradigm (yet), but we want cqlsh access to the data. In that paradigm, we have encountered this error during development, especially if/when you get the translation wrong between a CQL schema and the thrift interpretation. (which isn't hard to do) Provide a better CQL error when table data does not conform to CQL metadata. Key: CASSANDRA-5138 URL: https://issues.apache.org/jira/browse/CASSANDRA-5138 Project: Cassandra Issue Type: Bug Components: Core Affects Versions: 1.2.0 Environment: Mac OS X running 1.2 Reporter: Brian ONeill Priority: Minor Attachments: northpole.cql When you create a table via CQL, then insert into it via Thrift. If you inadvertently leave out a component of the column name, in CQL you receive a: TSocket read 0 bytes Server-side the following exception is logged: ERROR 15:19:18,016 Error occurred during processing of message. java.lang.ArrayIndexOutOfBoundsException: 3 at org.apache.cassandra.cql3.statements.ColumnGroupMap.add(ColumnGroupMap.java:43) at org.apache.cassandra.cql3.statements.ColumnGroupMap.access$200(ColumnGroupMap.java:31) at org.apache.cassandra.cql3.statements.ColumnGroupMap$Builder.add(ColumnGroupMap.java:138) at org.apache.cassandra.cql3.statements.SelectStatement.process(SelectStatement.java:805) at org.apache.cassandra.cql3.statements.SelectStatement.processResults(SelectStatement.java:145) at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:134) at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:61) at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:132) at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:140) at org.apache.cassandra.thrift.CassandraServer.execute_cql3_query(CassandraServer.java:1686) at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4074) at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4062) at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32) at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34) at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:199) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:680) I'll submit a schema, and steps to reproduce. -- 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] [Commented] (CASSANDRA-5138) Provide a better CQL error when table data does not conform to CQL metadata.
[ https://issues.apache.org/jira/browse/CASSANDRA-5138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13548962#comment-13548962 ] Brian ONeill commented on CASSANDRA-5138: - Fire up cassandra-cli, and execute the following: [default@unknown] use northpole; Authenticated to keyspace: northpole [default@northpole] set naughtyornicelist['naughty:USA']['PA:18964:michael.myers']='00'; Value inserted. Elapsed time: 36 msec(s). Then, go back to CQL and execute the following: cqlsh use northpole; cqlsh:northpole select * from naughtyornicelist ; TSocket read 0 bytes Provide a better CQL error when table data does not conform to CQL metadata. Key: CASSANDRA-5138 URL: https://issues.apache.org/jira/browse/CASSANDRA-5138 Project: Cassandra Issue Type: Bug Components: Core Affects Versions: 1.2.0 Environment: Mac OS X running 1.2 Reporter: Brian ONeill Priority: Minor Attachments: northpole.cql When you create a table via CQL, then insert into it via Thrift. If you inadvertently leave out a component of the column name, in CQL you receive a: TSocket read 0 bytes Server-side the following exception is logged: ERROR 15:19:18,016 Error occurred during processing of message. java.lang.ArrayIndexOutOfBoundsException: 3 at org.apache.cassandra.cql3.statements.ColumnGroupMap.add(ColumnGroupMap.java:43) at org.apache.cassandra.cql3.statements.ColumnGroupMap.access$200(ColumnGroupMap.java:31) at org.apache.cassandra.cql3.statements.ColumnGroupMap$Builder.add(ColumnGroupMap.java:138) at org.apache.cassandra.cql3.statements.SelectStatement.process(SelectStatement.java:805) at org.apache.cassandra.cql3.statements.SelectStatement.processResults(SelectStatement.java:145) at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:134) at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:61) at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:132) at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:140) at org.apache.cassandra.thrift.CassandraServer.execute_cql3_query(CassandraServer.java:1686) at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4074) at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4062) at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32) at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34) at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:199) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:680) I'll submit a schema, and steps to reproduce. -- 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