Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id A04452009FB for ; Fri, 6 May 2016 20:31:14 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 9EE9D160A0D; Fri, 6 May 2016 18:31:14 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E6B8C1608F8 for ; Fri, 6 May 2016 20:31:13 +0200 (CEST) Received: (qmail 68152 invoked by uid 500); 6 May 2016 18:31:13 -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 68127 invoked by uid 99); 6 May 2016 18:31:13 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 May 2016 18:31:13 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id DD6462C1F64 for ; Fri, 6 May 2016 18:31:12 +0000 (UTC) Date: Fri, 6 May 2016 18:31:12 +0000 (UTC) From: "Sylvain Lebresne (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (CASSANDRA-11721) Have a per operation truncate ddl "no snapshot" option MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 06 May 2016 18:31:14 -0000 [ https://issues.apache.org/jira/browse/CASSANDRA-11721?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15274524#comment-15274524 ] Sylvain Lebresne edited comment on CASSANDRA-11721 at 5/6/16 6:30 PM: ---------------------------------------------------------------------- As said above, it's probably not gonna happen too soon, but for the record, if we do got with a DDL syntax, my preference would be to add some {{WITH OPTIONS}} rather than some specific {{NO SNAPSHOT}}. So something like: {noformat} TRUNCATE x WITH OPTIONS = { 'snapshot' : false } {noformat} so that it's somewhat more consistent with other statements and can be easily extended to other options without requiring new syntax every time. was (Author: slebresne): As said above, it's probably not gonna happen too soon, but for the record, if we do got with a DDL syntax, my preference would be to add some {{WITH OPTIONS}} rather than some specific {{NO SNAPSHOT}}. So something like: {{noformat}} TRUNCATE x WITH OPTIONS = { 'snapshot' : false } {{noformat}} so that it's somewhat more consistent with other statements and can be easily extended to other options without requiring new syntax every time. > Have a per operation truncate ddl "no snapshot" option > ------------------------------------------------------ > > Key: CASSANDRA-11721 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11721 > Project: Cassandra > Issue Type: Wish > Components: CQL > Reporter: Jeremy Hanna > Priority: Minor > > Right now with truncate, it will always create a snapshot. That is the right thing to do most of the time. 'auto_snapshot' exists as an option to disable that but it is server wide and requires a restart to change. There are data models, however, that require rotating through a handful of tables and periodically truncating them. Currently you either have to operate with no safety net (some actually do this) or manually clear those snapshots out periodically. Both are less than optimal. > In HDFS, you generally delete something where it goes to the trash. If you don't want that safety net, you can do something like 'rm -rf -skiptrash /jeremy/stuff' in one command. > It would be nice to have something in the truncate ddl to skip the snapshot on a per operation basis. Perhaps 'TRUNCATE solarsystem.earth NO SNAPSHOT'. > This might also be useful in those situations where you're just playing with data and you don't want something to take a snapshot in a development system. If that's the case, this would also be useful for the DROP operation, but that convenience is not the main reason for this option. -- This message was sent by Atlassian JIRA (v6.3.4#6332)