[jira] [Commented] (CASSANDRA-8678) CREATE TABLE accepts value for default_time_to_live on counter table
[ https://issues.apache.org/jira/browse/CASSANDRA-8678?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14297328#comment-14297328 ] Tyler Hobbs commented on CASSANDRA-8678: [~jjirsa] Thanks for the patch! This looks pretty good overall. A few comments: * It looks like 2.0 is also affected. Would you mind backporting for 2.0 as well? * Can you make the error message for both {{AlterTableStatement}} and {{CreateTableStatement}} Cannot set default_time_to_live on a table with counters? * In {{CreateTableStatement}}, a simple {{haveCounters}} boolean could be used instead of a set. Also, avoid adding extra whitespace in the {{else if}} clause. Thanks again! CREATE TABLE accepts value for default_time_to_live on counter table Key: CASSANDRA-8678 URL: https://issues.apache.org/jira/browse/CASSANDRA-8678 Project: Cassandra Issue Type: Wish Components: Tools Reporter: Aaron Ploetz Assignee: Jeff Jirsa Priority: Minor Fix For: 2.1.2 Attachments: cass-8678-2.diff, cassandra-8678.diff I can create a counter table (via cqlsh) with a default_time_to_live: CREATE TABLE IF NOT EXISTS metrics2( time timestamp, value counter, PRIMARY KEY ((time)) ) WITH default_time_to_live=10; Upsert a row that increments the counter: {{UPDATE metrics2 SET value=value+1 WHERE timestamp='2015-01-24 10:48 -0600';}} Wait 10 seconds, and select, and the row is (of course) still there. There should probably be a warning or error preventing the creation of a table that has both counter columns and a value set for default_time_to_live. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-8678) CREATE TABLE accepts value for default_time_to_live on counter table
[ https://issues.apache.org/jira/browse/CASSANDRA-8678?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14295808#comment-14295808 ] Aleksey Yeschenko commented on CASSANDRA-8678: -- Needs both. CREATE TABLE accepts value for default_time_to_live on counter table Key: CASSANDRA-8678 URL: https://issues.apache.org/jira/browse/CASSANDRA-8678 Project: Cassandra Issue Type: Wish Components: Tools Reporter: Aaron Ploetz Assignee: Jeff Jirsa Priority: Minor Fix For: 2.1.2 Attachments: cassandra-8678.diff I can create a counter table (via cqlsh) with a default_time_to_live: CREATE TABLE IF NOT EXISTS metrics2( time timestamp, value counter, PRIMARY KEY ((time)) ) WITH default_time_to_live=10; Upsert a row that increments the counter: {{UPDATE metrics2 SET value=value+1 WHERE timestamp='2015-01-24 10:48 -0600';}} Wait 10 seconds, and select, and the row is (of course) still there. There should probably be a warning or error preventing the creation of a table that has both counter columns and a value set for default_time_to_live. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-8678) CREATE TABLE accepts value for default_time_to_live on counter table
[ https://issues.apache.org/jira/browse/CASSANDRA-8678?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14296388#comment-14296388 ] Jeff Jirsa commented on CASSANDRA-8678: --- As a consistency note, there's a mix of InvalidRequestException() thrown in AlterTableStatement and CreateTableStatement vs ConfigurationException() thrown in CFMetaData validate - there may be value in consolidating that at some point, but probably beyond the scope of this issue. CREATE TABLE accepts value for default_time_to_live on counter table Key: CASSANDRA-8678 URL: https://issues.apache.org/jira/browse/CASSANDRA-8678 Project: Cassandra Issue Type: Wish Components: Tools Reporter: Aaron Ploetz Assignee: Jeff Jirsa Priority: Minor Fix For: 2.1.2 Attachments: cass-8678-2.diff, cassandra-8678.diff I can create a counter table (via cqlsh) with a default_time_to_live: CREATE TABLE IF NOT EXISTS metrics2( time timestamp, value counter, PRIMARY KEY ((time)) ) WITH default_time_to_live=10; Upsert a row that increments the counter: {{UPDATE metrics2 SET value=value+1 WHERE timestamp='2015-01-24 10:48 -0600';}} Wait 10 seconds, and select, and the row is (of course) still there. There should probably be a warning or error preventing the creation of a table that has both counter columns and a value set for default_time_to_live. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-8678) CREATE TABLE accepts value for default_time_to_live on counter table
[ https://issues.apache.org/jira/browse/CASSANDRA-8678?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14294206#comment-14294206 ] Jeff Jirsa commented on CASSANDRA-8678: --- Patch addresses trivial CREATE TABLE syntax, does not prevent ALTER TABLE after the fact. Can add that if necessary. CREATE TABLE accepts value for default_time_to_live on counter table Key: CASSANDRA-8678 URL: https://issues.apache.org/jira/browse/CASSANDRA-8678 Project: Cassandra Issue Type: Wish Components: Tools Reporter: Aaron Ploetz Priority: Minor Fix For: 2.1.2 Attachments: cassandra-8678.diff I can create a counter table (via cqlsh) with a default_time_to_live: CREATE TABLE IF NOT EXISTS metrics2( time timestamp, value counter, PRIMARY KEY ((time)) ) WITH default_time_to_live=10; Upsert a row that increments the counter: {{UPDATE metrics2 SET value=value+1 WHERE timestamp='2015-01-24 10:48 -0600';}} Wait 10 seconds, and select, and the row is (of course) still there. There should probably be a warning or error preventing the creation of a table that has both counter columns and a value set for default_time_to_live. -- This message was sent by Atlassian JIRA (v6.3.4#6332)