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 83E6997DE for ; Thu, 17 May 2012 18:41:19 +0000 (UTC) Received: (qmail 19671 invoked by uid 500); 17 May 2012 18:41:17 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 19631 invoked by uid 500); 17 May 2012 18:41:17 -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 19619 invoked by uid 99); 17 May 2012 18:41:17 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 May 2012 18:41:17 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of ruslan.usifov@gmail.com designates 209.85.213.44 as permitted sender) Received: from [209.85.213.44] (HELO mail-yw0-f44.google.com) (209.85.213.44) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 May 2012 18:41:10 +0000 Received: by yhq56 with SMTP id 56so2565354yhq.31 for ; Thu, 17 May 2012 11:40:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=w400CelQ+nziAD6QqIc8G3mgvM1IQUTuMdwS5RQ+Z0Q=; b=X8TdS0Sv6QF6nuIZAOdMihzARLSvgIVotUQ19Yw1S/cCximQdqrSQQh/mY4EVPGfng +Gv4vpSz44GBqC5k38WDhSW+KrlHNSoXiAsgf+oLauVUmwlVB8G6hBZZ1rpefApY0tmK DmQWO+vkfm+UJJR94MJ8I/2HYbGy2bJjGQajteFRCzcmTtVRiV+bslqE1KhIohT1edLr sRPzWWc3NYZpL255oa2xDGupBuOWQPamOkFVhDCpqRqX8QiGl12QTIYT0eG26JdAu07l tzooXaGkvVl5OTd14aiooA9zkGLkDFjGyPX/6uRvl8EY0sWC6fq9wIUBHryHwpeWq4rc AikA== MIME-Version: 1.0 Received: by 10.236.144.134 with SMTP id n6mr9062892yhj.45.1337280049360; Thu, 17 May 2012 11:40:49 -0700 (PDT) Received: by 10.236.170.196 with HTTP; Thu, 17 May 2012 11:40:49 -0700 (PDT) In-Reply-To: <89BD5AB7-4ECE-4DCE-8AA1-9A82A046F317@gmail.com> References: <2C85E14562B39345BCCAD90B8E7955C90DA64F@DKEXC001.adform.com> <89BD5AB7-4ECE-4DCE-8AA1-9A82A046F317@gmail.com> Date: Thu, 17 May 2012 22:40:49 +0400 Message-ID: Subject: Re: Exception when truncate From: ruslan usifov To: user@cassandra.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Its our test machine with one node in cluster:-) 2012/5/17 Jeremy Hanna : > when doing a truncate, it has to talk to all of the nodes in the ring to = perform the operation. =A0by the error, it looks like one of the nodes was = unreachable for some reason. =A0you might do a nodetool ring in the cli do = a 'describe cluster;' and see if your ring is okay. > > So I think the operation is just as fast, it just looks like it times out= (20 seconds or something) when trying to perform the command against all o= f the nodes in the cluster. > > On May 17, 2012, at 9:36 AM, ruslan usifov wrote: > >> Maybe, something changes in cassandra 1.0.x for truncate mechanism, >> because in cassandra 0.8 truncate executes much faster on the same >> data >> >> 2012/5/17 Viktor Jevdokimov : >>> Truncate flushes all memtables to free up commit logs, and that on all = nodes. 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 i= s intended solely for the attention and use of the named addressee and may = be confidential. If you are not the intended recipient, you are reminded th= at the information remains the property of the sender. You must not use, di= sclose, distribute, copy, print or rely on this e-mail. If you have receive= d this message in error, please contact the sender immediately and irrevoca= bly 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() >>>>> =A0 =A0 =A0 =A0at >>>>> org.apache.cassandra.thrift.Cassandra$truncate_result.read(Cassandra.= j >>>>> ava:20212) >>>>> =A0 =A0 =A0 =A0at >>>>> org.apache.cassandra.thrift.Cassandra$Client.recv_truncate(Cassandra.= j >>>>> ava:1077) >>>>> =A0 =A0 =A0 =A0at >>>>> org.apache.cassandra.thrift.Cassandra$Client.truncate(Cassandra.java:= 1 >>>>> 052) >>>>> =A0 =A0 =A0 =A0at >>>>> org.apache.cassandra.cli.CliClient.executeTruncate(CliClient.java:144= 5 >>>>> ) >>>>> =A0 =A0 =A0 =A0at >>>>> org.apache.cassandra.cli.CliClient.executeCLIStatement(CliClient.java= : >>>>> 272) >>>>> =A0 =A0 =A0 =A0at >>>>> org.apache.cassandra.cli.CliMain.processStatementInteractive(CliMain.= j >>>>> ava:220) >>>>> =A0 =A0 =A0 =A0at 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 >>>>> =A0 =A0 =A0 =A0at >>>>> >>>> org.apache.cassandra.db.ColumnFamilyStore.snapshotWithoutFlush(Column >>>> F >>>>> amilyStore.java:1433) >>>>> =A0 =A0 =A0 =A0at >>>>> >>>> org.apache.cassandra.db.ColumnFamilyStore.snapshot(ColumnFamilyStore.j >>>>> ava:1462) >>>>> =A0 =A0 =A0 =A0at >>>>> >>>> org.apache.cassandra.db.ColumnFamilyStore.truncate(ColumnFamilyStore.j >>>>> ava:1657) >>>>> =A0 =A0 =A0 =A0at >>>>> >>>> org.apache.cassandra.db.TruncateVerbHandler.doVerb(TruncateVerbHandle >>>> r >>>>> .java:50) >>>>> =A0 =A0 =A0 =A0at >>>>> >>>> org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.j >>>>> ava:59) >>>>> =A0 =A0 =A0 =A0at >>>>> >>>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecu >>>>> tor.java:886) >>>>> =A0 =A0 =A0 =A0at >>>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor= . >>>>> java:908) >>>>> =A0 =A0 =A0 =A0at 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 >>>>> =A0 =A0 =A0 =A0at >>>>> org.apache.cassandra.io.util.FileUtils.createDirectory(FileUtils.java= : >>>>> 140) >>>>> =A0 =A0 =A0 =A0at >>>>> org.apache.cassandra.io.util.FileUtils.createDirectory(FileUtils.java= : >>>>> 131) >>>>> =A0 =A0 =A0 =A0at >>>>> >>>> org.apache.cassandra.db.ColumnFamilyStore.snapshotWithoutFlush(Column >>>> F >>>>> amilyStore.java:1409) >>>>> =A0 =A0 =A0 =A0... 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 >