Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3E25897C1 for ; Thu, 17 May 2012 11:12:58 +0000 (UTC) Received: (qmail 10420 invoked by uid 500); 17 May 2012 11:12:56 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 10172 invoked by uid 500); 17 May 2012 11:12:53 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 10141 invoked by uid 99); 17 May 2012 11:12:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 May 2012 11:12:52 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [86.58.139.11] (HELO mail1.adform.com) (86.58.139.11) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 May 2012 11:12:47 +0000 Received: from dkexc002.adform.com ([10.0.19.5]) by mail1.adform.com with XWall v3.47 ; Thu, 17 May 2012 14:12:26 +0300 Received: from DKEXC001.adform.com ([fe80::6d0c:ccd8:b690:688a]) by DKEXC002.adform.com ([fe80::a869:727c:285c:fd3%16]) with mapi id 14.02.0283.003; Thu, 17 May 2012 14:12:24 +0300 From: Viktor Jevdokimov To: "user@cassandra.apache.org" Subject: RE: Exception when truncate Thread-Topic: Exception when truncate Thread-Index: AQHNNBOVzrkyGQgmQkyCH/7aLPf4BpbNjsuAgABD26A= Date: Thu, 17 May 2012 11:12:25 +0000 Message-ID: <2C85E14562B39345BCCAD90B8E7955C90DA64F@DKEXC001.adform.com> References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [192.168.0.95] Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-XWALL-BCKS: auto X-Virus-Checked: Checked by ClamAV on apache.org Truncate flushes all memtables to free up commit logs, and that on all node= s. So this takes time. Discussed on this list not so long ago. Watch for: https://issues.apache.org/jira/browse/CASSANDRA-3651 https://issues.apache.org/jira/browse/CASSANDRA-4006 Best regards / Pagarbiai Viktor Jevdokimov Senior Developer Email: Viktor.Jevdokimov@adform.com Phone: +370 5 212 3063 Fax: +370 5 261 0453 J. Jasinskio 16C, LT-01112 Vilnius, Lithuania Disclaimer: The information contained in this message and attachments is in= tended solely for the attention and use of the named addressee and may be c= onfidential. If you are not the intended recipient, you are reminded that t= he information remains the property of the sender. You must not use, disclo= se, distribute, copy, print or rely on this e-mail. If you have received th= is message in error, please contact the sender immediately and irrevocably = delete this message and any copies.> -----Original Message----- > From: ruslan usifov [mailto:ruslan.usifov@gmail.com] > Sent: Thursday, May 17, 2012 13:06 > To: user@cassandra.apache.org > Subject: Re: Exception when truncate > > Also i miss understand why on empty CF(no any SStable) truncate heavy > loads disk?? > > 2012/5/17 ruslan usifov : > > Hello > > > > I have follow situation on our test server: > > > > from cassandra-cli i try to use > > > > truncate purchase_history; > > > > 3 times i got: > > > > [default@township_6waves] truncate purchase_history; null > > UnavailableException() > > at > > org.apache.cassandra.thrift.Cassandra$truncate_result.read(Cassandra.j > > ava:20212) > > at > > org.apache.cassandra.thrift.Cassandra$Client.recv_truncate(Cassandra.j > > ava:1077) > > at > > org.apache.cassandra.thrift.Cassandra$Client.truncate(Cassandra.java:1 > > 052) > > at > > org.apache.cassandra.cli.CliClient.executeTruncate(CliClient.java:1445 > > ) > > at > > org.apache.cassandra.cli.CliClient.executeCLIStatement(CliClient.java: > > 272) > > at > > org.apache.cassandra.cli.CliMain.processStatementInteractive(CliMain.j > > ava:220) > > at org.apache.cassandra.cli.CliMain.main(CliMain.java:348) > > > > > > So this looks that truncate goes very slow and too long, than > > rpc_timeout_in_ms: 10000 (this can happens because we have very slow > > disck on test machine) > > > > But in in cassandra system log i see follow exception: > > > > > > ERROR [MutationStage:7022] 2012-05-17 12:19:14,356 > > AbstractCassandraDaemon.java (line 139) Fatal exception in thread > > Thread[MutationStage:7022,5,main] > > java.io.IOError: java.io.IOException: unable to mkdirs > > > /home/cassandra/1.0.0/data/township_6waves/snapshots/1337242754356- > pur > > chase_history > > at > > > org.apache.cassandra.db.ColumnFamilyStore.snapshotWithoutFlush(Column > F > > amilyStore.java:1433) > > at > > > org.apache.cassandra.db.ColumnFamilyStore.snapshot(ColumnFamilyStore.j > > ava:1462) > > at > > > org.apache.cassandra.db.ColumnFamilyStore.truncate(ColumnFamilyStore.j > > ava:1657) > > at > > > org.apache.cassandra.db.TruncateVerbHandler.doVerb(TruncateVerbHandle > r > > .java:50) > > at > > > org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.j > > ava:59) > > at > > > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecu > > tor.java:886) > > at > > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor. > > java:908) > > at java.lang.Thread.run(Thread.java:662) > > Caused by: java.io.IOException: unable to mkdirs > > > /home/cassandra/1.0.0/data/township_6waves/snapshots/1337242754356- > pur > > chase_history > > at > > org.apache.cassandra.io.util.FileUtils.createDirectory(FileUtils.java: > > 140) > > at > > org.apache.cassandra.io.util.FileUtils.createDirectory(FileUtils.java: > > 131) > > at > > > org.apache.cassandra.db.ColumnFamilyStore.snapshotWithoutFlush(Column > F > > amilyStore.java:1409) > > ... 7 more > > > > > > Also i see that in snapshort dir already exists > > 1337242754356-purchase_history directory, so i think that snapshort > > names that generate cassandra not uniquely. > > > > PS: We use cassandra 1.0.10 on Ubuntu 10.0.4-LTS