Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5DFB210EC1 for ; Tue, 27 Jan 2015 21:21:34 +0000 (UTC) Received: (qmail 99620 invoked by uid 500); 27 Jan 2015 21:21:34 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 99580 invoked by uid 500); 27 Jan 2015 21:21:34 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 99568 invoked by uid 99); 27 Jan 2015 21:21:34 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Jan 2015 21:21:34 +0000 Date: Tue, 27 Jan 2015 21:21:34 +0000 (UTC) From: "Jeff Jirsa (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-8678) CREATE TABLE accepts value for default_time_to_live on counter table MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-8678?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=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)