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 B5D0D113A2 for ; Tue, 29 Jul 2014 17:14:39 +0000 (UTC) Received: (qmail 72138 invoked by uid 500); 29 Jul 2014 17:14:39 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 72101 invoked by uid 500); 29 Jul 2014 17:14:39 -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 72087 invoked by uid 99); 29 Jul 2014 17:14:39 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Jul 2014 17:14:39 +0000 Date: Tue, 29 Jul 2014 17:14:39 +0000 (UTC) From: "Benedict (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-5911) Commit logs are not removed after nodetool flush or nodetool drain MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-5911?page=3Dcom.atlas= sian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D= 14077995#comment-14077995 ]=20 Benedict commented on CASSANDRA-5911: ------------------------------------- It is reasonably non-trivial. Besides various changes to ensure we mark the= CL clean correctly after drop/truncate, 2.0 would also need to introduce a= n extra check directly after switch lock acquire that aborts if the CF has = been dropped/truncated, and acquire the switch lock whenever we drop/trunca= te. We could have a crack at it though. > Commit logs are not removed after nodetool flush or nodetool drain > ------------------------------------------------------------------ > > Key: CASSANDRA-5911 > URL: https://issues.apache.org/jira/browse/CASSANDRA-5911 > Project: Cassandra > Issue Type: Bug > Components: Core > Reporter: J.B. Langston > Assignee: Vijay > Priority: Minor > Fix For: 2.0.5 > > Attachments: 0001-5911-v2.patch, 0001-5911-v3.patch, 0001-CASSAND= RA-5911.patch, 6528_140171_knwmuqxe9bjv5re_system.log > > > Commit logs are not removed after nodetool flush or nodetool drain. This = can lead to unnecessary commit log replay during startup. I've reproduced = this on Apache Cassandra 1.2.8. Usually this isn't much of an issue but on= a Solr-indexed column family in DSE, each replayed mutation has to be rein= dexed which can make startup take a long time (on the order of 20-30 min). > Reproduction follows: > {code} > jblangston:bin jblangston$ ./cassandra > /dev/null > jblangston:bin jblangston$ ../tools/bin/cassandra-stress -n 20000000 > /d= ev/null > jblangston:bin jblangston$ du -h ../commitlog > 576M=09../commitlog > jblangston:bin jblangston$ nodetool flush > jblangston:bin jblangston$ du -h ../commitlog > 576M=09../commitlog > jblangston:bin jblangston$ nodetool drain > jblangston:bin jblangston$ du -h ../commitlog > 576M=09../commitlog > jblangston:bin jblangston$ pkill java > jblangston:bin jblangston$ du -h ../commitlog > 576M=09../commitlog > jblangston:bin jblangston$ ./cassandra -f | grep Replaying > INFO 10:03:42,915 Replaying /opt/apache-cassandra-1.2.8/commitlog/Commit= Log-2-1377096566761.log, /opt/apache-cassandra-1.2.8/commitlog/CommitLog-2-= 1377096566762.log, /opt/apache-cassandra-1.2.8/commitlog/CommitLog-2-137709= 6566763.log, /opt/apache-cassandra-1.2.8/commitlog/CommitLog-2-137709656676= 4.log, /opt/apache-cassandra-1.2.8/commitlog/CommitLog-2-1377096566765.log,= /opt/apache-cassandra-1.2.8/commitlog/CommitLog-2-1377096566766.log, /opt/= apache-cassandra-1.2.8/commitlog/CommitLog-2-1377096566767.log, /opt/apache= -cassandra-1.2.8/commitlog/CommitLog-2-1377096566768.log, /opt/apache-cassa= ndra-1.2.8/commitlog/CommitLog-2-1377096566769.log, /opt/apache-cassandra-1= .2.8/commitlog/CommitLog-2-1377096566770.log, /opt/apache-cassandra-1.2.8/c= ommitlog/CommitLog-2-1377096566771.log, /opt/apache-cassandra-1.2.8/commitl= og/CommitLog-2-1377096566772.log, /opt/apache-cassandra-1.2.8/commitlog/Com= mitLog-2-1377096566773.log, /opt/apache-cassandra-1.2.8/commitlog/CommitLog= -2-1377096566774.log, /opt/apache-cassandra-1.2.8/commitlog/CommitLog-2-137= 7096566775.log, /opt/apache-cassandra-1.2.8/commitlog/CommitLog-2-137709656= 6776.log, /opt/apache-cassandra-1.2.8/commitlog/CommitLog-2-1377096566777.l= og, /opt/apache-cassandra-1.2.8/commitlog/CommitLog-2-1377096566778.log > INFO 10:03:42,922 Replaying /opt/apache-cassandra-1.2.8/commitlog/Commit= Log-2-1377096566761.log > INFO 10:03:43,907 Replaying /opt/apache-cassandra-1.2.8/commitlog/Commit= Log-2-1377096566762.log > INFO 10:03:43,907 Replaying /opt/apache-cassandra-1.2.8/commitlog/Commit= Log-2-1377096566763.log > INFO 10:03:43,907 Replaying /opt/apache-cassandra-1.2.8/commitlog/Commit= Log-2-1377096566764.log > INFO 10:03:43,908 Replaying /opt/apache-cassandra-1.2.8/commitlog/Commit= Log-2-1377096566765.log > INFO 10:03:43,908 Replaying /opt/apache-cassandra-1.2.8/commitlog/Commit= Log-2-1377096566766.log > INFO 10:03:43,908 Replaying /opt/apache-cassandra-1.2.8/commitlog/Commit= Log-2-1377096566767.log > INFO 10:03:43,909 Replaying /opt/apache-cassandra-1.2.8/commitlog/Commit= Log-2-1377096566768.log > INFO 10:03:43,909 Replaying /opt/apache-cassandra-1.2.8/commitlog/Commit= Log-2-1377096566769.log > INFO 10:03:43,909 Replaying /opt/apache-cassandra-1.2.8/commitlog/Commit= Log-2-1377096566770.log > INFO 10:03:43,910 Replaying /opt/apache-cassandra-1.2.8/commitlog/Commit= Log-2-1377096566771.log > INFO 10:03:43,910 Replaying /opt/apache-cassandra-1.2.8/commitlog/Commit= Log-2-1377096566772.log > INFO 10:03:43,911 Replaying /opt/apache-cassandra-1.2.8/commitlog/Commit= Log-2-1377096566773.log > INFO 10:03:43,911 Replaying /opt/apache-cassandra-1.2.8/commitlog/Commit= Log-2-1377096566774.log > INFO 10:03:43,911 Replaying /opt/apache-cassandra-1.2.8/commitlog/Commit= Log-2-1377096566775.log > INFO 10:03:43,912 Replaying /opt/apache-cassandra-1.2.8/commitlog/Commit= Log-2-1377096566776.log > INFO 10:03:43,912 Replaying /opt/apache-cassandra-1.2.8/commitlog/Commit= Log-2-1377096566777.log > INFO 10:03:43,912 Replaying /opt/apache-cassandra-1.2.8/commitlog/Commit= Log-2-1377096566778.log > {code} -- This message was sent by Atlassian JIRA (v6.2#6252)