diff --git a/src/java/org/apache/cassandra/db/CommitLog.java b/src/java/org/apache/cassandra/db/CommitLog.java
index <HASH>..<HASH> 100644
--- a/src/java/org/apache/cassandra/db/CommitLog.java
+++ b/src/java/org/apache/cassandra/db/CommitLog.java
@@ -270,8 +270,17 @@ public class CommitLog
             /* read the logs populate RowMutation and apply */

             while ( !reader.isEOF() )

             {

-                byte[] bytes = new byte[(int)reader.readLong()];

-                reader.readDirect(bytes);

+                byte[] bytes;

+                try

+                {

+                    bytes = new byte[(int)reader.readLong()];

+                    reader.readDirect(bytes);

+                }

+                catch (EOFException e)

+                {

+                    // last CL entry didn't get completely written.  that's ok.

+                    break;

+                }

                 bufIn.reset(bytes, bytes.length);

 

                 /* read the commit log entry */
handle incomplete CL entries on recover
patch by jbellis; reviewed by Jun Rao for CASSANDRA-<I>

git-svn-id: <URL>