Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 57999 invoked from network); 30 Mar 2011 16:54:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 30 Mar 2011 16:54:54 -0000 Received: (qmail 87369 invoked by uid 500); 30 Mar 2011 16:54:52 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 87344 invoked by uid 500); 30 Mar 2011 16:54:52 -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 87336 invoked by uid 99); 30 Mar 2011 16:54:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Mar 2011 16:54:52 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.160.172] (HELO mail-gy0-f172.google.com) (209.85.160.172) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Mar 2011 16:54:44 +0000 Received: by gyf3 with SMTP id 3so670811gyf.31 for ; Wed, 30 Mar 2011 09:54:23 -0700 (PDT) MIME-Version: 1.0 Received: by 10.150.75.4 with SMTP id x4mr1679175yba.410.1301504062961; Wed, 30 Mar 2011 09:54:22 -0700 (PDT) Sender: scode@scode.org Received: by 10.150.147.9 with HTTP; Wed, 30 Mar 2011 09:54:22 -0700 (PDT) X-Originating-IP: [212.181.83.218] In-Reply-To: <4D92DBEF.2050105@hiramoto.org> References: <1301420212192-6220171.post@n2.nabble.com> <1301421070734-6220228.post@n2.nabble.com> <1301424132945-6220423.post@n2.nabble.com> <1301428784487-6220683.post@n2.nabble.com> <1301434571427-6221041.post@n2.nabble.com> <1301436482271-6221157.post@n2.nabble.com> <4D92DBEF.2050105@hiramoto.org> Date: Wed, 30 Mar 2011 18:54:22 +0200 X-Google-Sender-Auth: CGhOasCEg0OnrM5uowmW_o6opPc Message-ID: Subject: Re: How to determine if repair need to be run From: Peter Schuller To: user@cassandra.apache.org Cc: Karl Hiramoto Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable > Note this script doesn't work if your repair takes hours, and in the > middle of the repair cassandra was restarted, nodetool will exit and the > flagfile will be updated. =C2=A0 Another case, if repair hangs, and day l= ater > cassandra is restarted. This is why "set -e" is at the to and commented as "important" :) But it relies on 'nodetool repair' reliably exiting with non-zero exit status on failures. > if nodetool returns an error this might work: > > =C2=A0nodetool -h localhost repair && touch /path/to/flagfile.tmp That's the equivalent, due to 'set -e'. --=20 / Peter Schuller