cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jun...@apache.org
Subject svn commit: r882335 - /incubator/cassandra/trunk/src/java/org/apache/cassandra/db/CommitLog.java
Date Thu, 19 Nov 2009 22:25:07 GMT
Author: junrao
Date: Thu Nov 19 22:25:07 2009
New Revision: 882335

URL: http://svn.apache.org/viewvc?rev=882335&view=rev
Log:
BufferedRandomAccessFile.read doesn't always do full reads; patched by junrao, reviewed by
jbellis for CASSANDRA-565

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=882335&r1=882334&r2=882335&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 Thu Nov 19 22:25:07
2009
@@ -315,10 +315,7 @@
                 try
                 {
                     bytes = new byte[(int) reader.readLong()]; // readlong can throw EOFException
too
-                    if (reader.read(bytes) < bytes.length)
-                    {
-                        throw new EOFException();
-                    }
+                    reader.readFully(bytes);
                 }
                 catch (EOFException e)
                 {



Mime
View raw message