cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbros...@apache.org
Subject cassandra git commit: make sure spillbuffer is read thoroughly
Date Thu, 16 Jun 2016 03:00:35 GMT
Repository: cassandra
Updated Branches:
  refs/heads/trunk 91b12fc4b -> 9c6c072d9


make sure spillbuffer is read thoroughly


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/9c6c072d
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/9c6c072d
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/9c6c072d

Branch: refs/heads/trunk
Commit: 9c6c072d93811a300cff754f00b5178035bf7112
Parents: 91b12fc
Author: Dave Brosius <dbrosius@mebigfatguy.com>
Authored: Wed Jun 15 22:59:17 2016 -0400
Committer: Dave Brosius <dbrosius@mebigfatguy.com>
Committed: Wed Jun 15 22:59:17 2016 -0400

----------------------------------------------------------------------
 .../apache/cassandra/io/util/RewindableDataInputStreamPlus.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/9c6c072d/src/java/org/apache/cassandra/io/util/RewindableDataInputStreamPlus.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/io/util/RewindableDataInputStreamPlus.java b/src/java/org/apache/cassandra/io/util/RewindableDataInputStreamPlus.java
index af4d4a0..ad2e8bd 100644
--- a/src/java/org/apache/cassandra/io/util/RewindableDataInputStreamPlus.java
+++ b/src/java/org/apache/cassandra/io/util/RewindableDataInputStreamPlus.java
@@ -277,7 +277,7 @@ public class RewindableDataInputStreamPlus extends FilterInputStream implements
             if (len > 0 && diskTailAvailable > 0)
             {
                 int readFromTail = diskTailAvailable < len? diskTailAvailable : len;
-                getIfNotClosed(spillBuffer).read(b, off, readFromTail);
+                readFromTail = getIfNotClosed(spillBuffer).read(b, off, readFromTail);
                 readBytes += readFromTail;
                 diskTailAvailable -= readFromTail;
                 off += readFromTail;
@@ -288,7 +288,7 @@ public class RewindableDataInputStreamPlus extends FilterInputStream implements
             if (len > 0 && diskHeadAvailable > 0)
             {
                 int readFromHead = diskHeadAvailable < len? diskHeadAvailable : len;
-                getIfNotClosed(spillBuffer).read(b, off, readFromHead);
+                readFromHead = getIfNotClosed(spillBuffer).read(b, off, readFromHead);
                 readBytes += readFromHead;
                 diskHeadAvailable -= readFromHead;
                 off += readFromHead;


Mime
View raw message