You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by jb...@apache.org on 2009/08/26 20:33:47 UTC
svn commit: r808151 -
/incubator/cassandra/trunk/src/java/org/apache/cassandra/db/CommitLog.java
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<Table> tablesRecovered = new HashSet<Table>();
/* read the logs populate RowMutation and apply */
while (!reader.isEOF())
{
+ if (logger_.isDebugEnabled())
+ logger_.debug("Reading mutation at " + reader.getFilePointer());
+
byte[] bytes;
try
{