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 1E0AA186C8 for ; Sun, 7 Feb 2016 14:44:40 +0000 (UTC) Received: (qmail 74525 invoked by uid 500); 7 Feb 2016 14:44:40 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 74488 invoked by uid 500); 7 Feb 2016 14:44:40 -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 74477 invoked by uid 99); 7 Feb 2016 14:44:39 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 07 Feb 2016 14:44:39 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id C3D462C14F6 for ; Sun, 7 Feb 2016 14:44:39 +0000 (UTC) Date: Sun, 7 Feb 2016 14:44:39 +0000 (UTC) From: "FACORAT (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-10962) Cassandra should not create snapshot at restart for compactions_in_progress 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-10962?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15136275#comment-15136275 ] FACORAT commented on CASSANDRA-10962: ------------------------------------- OK, first to reproduce this you need to activate auto_snapshot in cassandra.yaml http://docs.datastax.com/en/cassandra/2.2/cassandra/configuration/configCassandra_yaml.html?scroll=configCassandra_yaml__auto_snapshot Then if you look at CassandraDaemon.java, you will note that at startup it will discard compaction_in_progress: https://github.com/apache/cassandra/blob/cassandra-2.2/src/java/org/apache/cassandra/service/CassandraDaemon.java#L220 SystemKeyspace.discardCompactionsInProgress() means truncating the system.compactions_in_progress table: https://github.com/apache/cassandra/blob/cassandra-2.2/src/java/org/apache/cassandra/db/SystemKeyspace.java#L402 So you end up with a snaphot in data_dir/system/compactions_in_progress/, but you can't see it with "nodetool listsnaphots" which is filtering out system keyspaces. However as this is temporary files, there's no need to snapshot system.compactions_in_progress when doing a truncate on it IMHO. Please note that CASSANDRA-7066 should fix this behavior in 3.0 > Cassandra should not create snapshot at restart for compactions_in_progress > --------------------------------------------------------------------------- > > Key: CASSANDRA-10962 > URL: https://issues.apache.org/jira/browse/CASSANDRA-10962 > Project: Cassandra > Issue Type: Bug > Environment: Ubuntu 14.04.3 LTS > Reporter: FACORAT > Priority: Minor > > If auto_snapshot is set to true in cassandra.yaml, each time you restart Cassandra, a snapshot is created for system.compactions_in_progress as the table is truncated at cassandra start. > However as datas in this table are temporary, Cassandra should not create snapshot for this table (or maybe even for system.* tables). This will be coherent with the fact that "nodetool listsnapshots" doesn't even list this table. > Exemple: > $ nodetool listsnapshots | grep compactions > $ ls -lh system/compactions_in_progress-55080ab05d9c388690a4acb25fe1f77b/snapshots/ > total 16K > drwxr-xr-x 2 cassandra cassandra 4.0K Nov 30 13:12 1448885530280-compactions_in_progress > drwxr-xr-x 2 cassandra cassandra 4.0K Dec 7 15:36 1449498977181-compactions_in_progress > drwxr-xr-x 2 cassandra cassandra 4.0K Dec 14 18:20 1450113621506-compactions_in_progress > drwxr-xr-x 2 cassandra cassandra 4.0K Jan 4 12:53 1451908396364-compactions_in_progress -- This message was sent by Atlassian JIRA (v6.3.4#6332)