Return-Path: Delivered-To: apmail-incubator-cassandra-commits-archive@minotaur.apache.org Received: (qmail 71947 invoked from network); 26 Aug 2009 18:34:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 26 Aug 2009 18:34:09 -0000 Received: (qmail 77710 invoked by uid 500); 26 Aug 2009 18:34:09 -0000 Delivered-To: apmail-incubator-cassandra-commits-archive@incubator.apache.org Received: (qmail 77692 invoked by uid 500); 26 Aug 2009 18:34:08 -0000 Mailing-List: contact cassandra-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cassandra-dev@incubator.apache.org Delivered-To: mailing list cassandra-commits@incubator.apache.org Received: (qmail 77682 invoked by uid 99); 26 Aug 2009 18:34:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Aug 2009 18:34:08 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Aug 2009 18:34:07 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 327482388878; Wed, 26 Aug 2009 18:33:47 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r808151 - /incubator/cassandra/trunk/src/java/org/apache/cassandra/db/CommitLog.java Date: Wed, 26 Aug 2009 18:33:47 -0000 To: cassandra-commits@incubator.apache.org From: jbellis@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090826183347.327482388878@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jbellis Date: Wed Aug 26 18:33:46 2009 New Revision: 808151 URL: http://svn.apache.org/viewvc?rev=808151&view=rev Log: add more (debug) logging to log recovery process. patch by jbellis Modified: incubator/cassandra/trunk/src/java/org/apache/cassandra/db/CommitLog.java Modified: incubator/cassandra/trunk/src/java/org/apache/cassandra/db/CommitLog.java URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/java/org/apache/cassandra/db/CommitLog.java?rev=808151&r1=808150&r2=808151&view=diff ============================================================================== --- incubator/cassandra/trunk/src/java/org/apache/cassandra/db/CommitLog.java (original) +++ incubator/cassandra/trunk/src/java/org/apache/cassandra/db/CommitLog.java Wed Aug 26 18:33:46 2009 @@ -283,22 +283,23 @@ int bufferSize = (int)Math.min(file.length(), 32 * 1024 * 1024); BufferedRandomAccessFile reader = new BufferedRandomAccessFile(file.getAbsolutePath(), "r", bufferSize); CommitLogHeader clHeader = readCommitLogHeader(reader); - /* seek to the lowest position */ + /* seek to the lowest position where any CF has non-flushed data */ int lowPos = CommitLogHeader.getLowestPosition(clHeader); - /* - * If lowPos == 0 then we need to skip the processing of this - * file. - */ if (lowPos == 0) break; - else - reader.seek(lowPos); + + reader.seek(lowPos); + if (logger_.isDebugEnabled()) + logger_.debug("Replaying " + file + " starting at " + lowPos); Set tablesRecovered = new HashSet
(); /* read the logs populate RowMutation and apply */ while (!reader.isEOF()) { + if (logger_.isDebugEnabled()) + logger_.debug("Reading mutation at " + reader.getFilePointer()); + byte[] bytes; try {